Stream terminal calls for this device's number
Server-Sent Events change-feed of calls that have ENDED on the authenticated device's DID. Scope comes from the device's own line, never from a request parameter. This is not a history endpoint: a fresh connect with no Last-Event-ID starts LIVE from now, not a replay — the app loads its recents list and pages back through history via GET /v1/calls, which is cursor-paginated for lazy scrolling.
Send the id: of the last event you processed as Last-Event-ID to resume; a malformed cursor is refused (400) rather than coerced to "start live", since that would look like silent data loss to the client. Frames carry only call_id, status, missed and ended_at — a pointer, not the full record — so clients fetch the authoritative row from GET /v1/calls/{id}.
Redelivery is intentional: a call is re-sent whenever its row is updated after hangup (billing, recording-ready), and a fresh connection re-reads a few seconds of overlap to protect against transaction-commit skew. Clients MUST deduplicate on call_id.
An event: truncated frame means more calls remain past this page; reconnect immediately with the advanced cursor and repeat until a connect yields none. An event: reconnect frame means the connection reached its 15-minute lifetime cap; reconnect the same way. : keepalive comment lines have no event: field and should be ignored.
Authorization
deviceAuth A per-device secret issued by POST /v1/devices/enroll, presented as
Authorization: Device <secret>.
A distinct scheme rather than another bearer flavour: the bearer namespace already carries workspace API keys and session JWTs, and a device secret authorises far less than either — it can mint a WebRTC token for its own identity and report presence, and nothing else.
In: header
Header Parameters
The id: of the last event this device processed. Omit only on a fresh install — the stream then starts live from now rather than replaying history.
Response Body
text/event-stream
application/json
application/json
application/json
curl -X GET "https://example.com/v1/devices/calls/stream""string"{ "error": { "code": "validation.bad_request", "message": "string", "request_id": "string", "details": [ "string" ] }}{ "error": { "code": "validation.bad_request", "message": "string", "request_id": "string", "details": [ "string" ] }}{ "error": { "code": "validation.bad_request", "message": "string", "request_id": "string", "details": [ "string" ] }}