Skip to main content
Live. This is the audio channel for a call you placed with Place a FaceTime Call. Open the streamUrl it returned and you get the call’s audio both ways, so you can build your own call UI — a dialer, a softphone, a web app — with no Tuco call window.

The URL

Place a FaceTime Call returns a streamUrl:
It’s a WebSocket URL, one-time and per-call. The token in the query string is short-lived and scoped to that single call and workspace — it carries no API key, so it is safe to hand to a browser. WebSocket connections aren’t subject to CORS, so you connect to it directly from your frontend; your API key never leaves your server. Open it as soon as you have it — the other side’s phone is already ringing.

Protocol

The connection is binary audio both ways, plus small JSON phase frames from the server.
binary
Your caller’s microphone, as 16-bit signed PCM, little-endian, 48,000 Hz, mono. Send it in binary WebSocket frames (any reasonable chunk size — e.g. 20–40 ms of audio per frame).
binary
The other side’s audio, in the same format — 16-bit signed PCM, little-endian, 48,000 Hz, mono. Arrives as binary frames; play it as it comes.
text (JSON)
Text frames announcing call state, so your UI can react without waiting on your server’s webhooks:
connected means the other side answered; ended means the call is over (the connection closes right after). The same transitions are also delivered to your backend as call.ringing / call.answered / call.ended webhooks — use whichever fits.
One listener per call. Each call’s streamUrl serves a single connection. A second attempt to connect to the same call is rejected with close code 4409.

Close codes

The server closes the socket with an app code (4000–4999) when something’s wrong:

Browser example

A minimal two-way loop: capture the microphone, send it up, play what comes back, and react to phase frames.
To mute, just stop sending microphone frames (and optionally call POST /api/facetime/event with action: "mute"). To hang up, call that same endpoint with action: "hangup" — don’t rely on only closing the socket, so the record is finalized cleanly.