response

View as Markdown

Direction: your server → Dial. The agent’s spoken reply to a response_required or reminder_required. Stream it as you generate it.

Schema

FieldTypeDescription
typestringAlways "response".
response_idintegerThe response_id from the request you’re answering.
contentstringA chunk of the agent’s reply (partial or full).
content_completebooleantrue only on the final chunk of this turn.
end_callbooleanOptional. true ends the call once this content has been spoken.

Streaming a turn

Send one or more response frames sharing the same response_id, streaming the agent’s words as they’re produced. Set content_complete: true on the last frame only. If a newer response_required arrives first, stop — it supersedes the in‑flight turn.

Example

Two streamed chunks completing one turn:

1{ "type": "response", "response_id": 7, "content": "Sure — let me pull that up. ", "content_complete": false }
1{ "type": "response", "response_id": 7, "content": "Your order shipped yesterday.", "content_complete": true }

Ending the call

Set end_call: true on the final frame; the agent finishes speaking the content and the call then ends:

1{ "type": "response", "response_id": 9, "content": "Thanks for calling — goodbye!", "content_complete": true, "end_call": true }