Send a live control
Steers a phone, browser or realtime call while it is in progress. Send it from your backend.
{"type": "instruction", "text": …}(1–1,000 characters) gives the agent a direction it follows from its next reply for the rest of the call. It isn’t read aloud.{"type": "say", "text": …}(1–1,000 characters) has the agent say exactly that. See Say a line on a live call.{"type": "play", "audio_url": …}plays an audio clip to the caller, or upload the clip itself. See Play an audio clip on a live call.{"type": "close", "message": …}speaksmessage(optional, up to 500 characters) as a goodbye and ends the call:completed,ended_reason: api-ended-call, billed like any completed call. Withoutmessagethe agent uses its own closing line.
It answers 200 when the live call confirmed it within 3 seconds (applied, or rejected with a reason), and 202 with status: pending otherwise. Check a pending one with Get a live control. The call must be live: a phone call that hasn’t been answered, a browser call whose page hasn’t connected, or a call that already ended is a 409 call_not_active. Controls cost nothing extra: the call is billed per minute as usual.
Send an Idempotency-Key. A repeat with the same key returns the same control and is never delivered twice, so a retry can’t make the agent say goodbye twice.
Authorizations
Headers
Response
Applied by the live call