Stream call events (SSE)
Changed onStream live call events as text/event-stream, parsing each SSE event as it arrives rather than waiting for the response to finish. Start with after_event_id=0; on reconnect, pass the last received id as after_event_id. Last-Event-ID is not supported. Heartbeat events keep idle connections alive: ignore them and SSE comments, keeping the last event ID when no id is present. Reconnect after a disconnect while the call is active, and check GET /calls/{call_id} for its terminal status.
Events: status_change. ask_user: a mid-call question with request_id and message; it arrives whatever the call's ask_user_mode, so answer it promptly via POST /calls/{call_id}/answer. answered: your answer was accepted. outcome: terminal, with result, ended_by, line_kind, result_reason, the deprecated outcome_type, billable, charge_cents, charge_reason and summary. Its billable is the outcome family, not the bill, so read charge_cents. recording_ready. recording_revoked: the callee refused recording, so no recording or transcript will be served. transcript_ready: the post-call check of the recording has finished and its marks are on transcript_full. Its data is {at, turns_count, duration_ms, corrections, unheard}: corrections counts the rows where the recording differs, unheard the heard: false rows it added. It fires only when the check is saved, usually after the stream has closed, so poll GET /calls/{call_id} for transcript_status instead of waiting for it.
Request
- Base URLhttps://api.voygr.tech
- URLhttps://api.voygr.tech/calls/{call_id}/events
- AuthAPI key in header X-API-Key
Path parameters
Query parameters
Return only events with event_id greater than this cursor. Start at 0; advance to the last id: you received.
Response
SSE stream: the call's event history from the cursor, then live events with heartbeats. It closes about 5 seconds after the outcome event, or after 30 minutes.
Changes
- info
queryrequest parameterafter_event_idlist-of-types was widened by adding typesnull - info
for the
queryrequest parameterafter_event_id, the type was generalized fromintegerto no type
- info
- warning
deleted the
headerrequest parameterX-API-Key
- warning