Opens a server-sent events (SSE) stream that pushes the full call object every time it changes, until the call ends. The dashboard's live transcript uses this route. The server checks the call about every 400 ms and stops after 30 minutes. Beyond Retell
A live call can have at most 5 viewers at once (stream and Listen sessions count per person).
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
call_id |
string | Yes | The call to watch. |
Example request#
curl -N "https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/stream" \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/stream", {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const reader = res.body!.pipeThrough(new TextDecoderStream()).getReader();
for (;;) {
const { value, done } = await reader.read();
if (done) break;
process.stdout.write(value); // "event: call\ndata: {...}\n\n"
}import os, requests
with requests.get(
"https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/stream",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
stream=True,
) as res:
for line in res.iter_lines(decode_unicode=True):
if line:
print(line)Response#
200 OK with Content-Type: text/event-stream. Two event types are sent:
event: call
data: {"call_id":"call_8d1e0f2a3b4c5d6e7f8a9b0c","call_status":"ongoing","transcript_object":[...],...}
event: end
data: {"call_id":"call_8d1e0f2a3b4c5d6e7f8a9b0c"}| Event | Data |
|---|---|
call |
The full call object. Sent once on connect and again on every change. |
end |
{ "call_id" }. Sent when the call reaches ended, error or not_connected, or after 30 minutes. The stream then closes. |
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the calls scope. |
404 |
No call with this ID in the workspace. Returned before the stream opens. |
429 |
Rate limit exceeded. See Rate limits. The call already has 5 viewers. |
See Errors for the body format.