Skip to content

Poll call events (SSE-formatted)

GET /calls/{call_id}/events

https://api.voygr.tech/calls/{call_id}/events

Open in playground

Overview

Stream live call events as text/event-stream, parsing each SSE event as it arrives rather than waiting for the response to finish. Use after_event_id=0 initially; 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, preserving 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 include status_change, ask_user, outcome, recording_ready, transcript_ready. Set ask_user_mode=stream when creating a call and answer ask_user promptly via POST /calls/{call_id}/answer.

Authentication

  • API key in header X-API-Key: Your customer API key (pk_live_...), sent on every request. Self-serve at https://api.voygr.tech/checkout.

Parameters

NameLocationRequiredTypeDescription and constraints
call_idpathrequiredstring
after_event_idqueryoptionalintegerReturn only events with event_id greater than this cursor. Start at 0; advance to the last id: you received.
min 0

Responses

200

SSE-formatted text; empty body when no new events.

text/event-stream

Schema: string

statuschange

"id: 2077\nevent: status_change\ndata: {\"event_id\": 2077, \"call_id\": \"c_abc123\", \"event_type\": \"status_change\", \"data\": {\"status\": \"dialing\"}}\n\n"

401

Missing or invalid X-API-Key.

application/json

X-API-Key header absent

{
  "detail": {
    "error": "API key required"
  }
}

X-API-Key doesn't resolve to an active key

{
  "detail": {
    "error": "invalid API key"
  }
}

404

Call not found, or isn't yours.

application/json

notfound

{
  "detail": "Call not found"
}