POST /calls/{call_id}/answer
https://api.voygr.tech/calls/{call_id}/answer
Overview
Answer a question the agent asked mid-call. If no answer arrives before the wait window elapses, the call proceeds and wraps up gracefully rather than stalling indefinitely.
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
| Name | Location | Required | Type | Description and constraints |
|---|---|---|---|---|
call_id | path | required | string |
Request body
required
application/json
Schema: AnswerRequest
answer
{
"answer": "Yes, hold the table until 7:30pm"
}Responses
200
Successful Response
application/json
Schema: AnswerResponse
delivered
{
"delivered": true,
"reason": "delivered"
}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"
}
}Schemas
AnswerRequest
Type: any | any
Answer a pending question. Provide exactly one of answer or outcome. outcome also requires request_id. Invalid combinations return a validation error; request_id selects the pending question.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
answer | string (length 1 to 4000) | null | optional | Free text the bot will dictate to the operator (mode=voice, the default) or act on silently (mode=context). Mutually exclusive with outcome. |
outcome | string (one of timeout, transport_failure) | null | optional | Closed client-side outcome when the observed ask_user request cannot receive an answer. Requires request_id. Mutually exclusive with answer. |
request_id | string (max length 64) | null | optional | Disambiguates which pending ask_user this answers, when several are in flight on the same call. Required when outcome is set; optional with answer (falls back to FIFO - oldest pending - when omitted). |
mode | string | optional | 'voice' (default): the bot speaks answer aloud to the operator. 'context': silent guidance - the bot acts on answer without voicing it (e.g. concierge IVR navigation hints). Only meaningful with answer, not outcome.one of voice, context; default voice |
One of
- Option 1: requires
answer - Option 2: requires
outcome,request_id
AnswerResponse
Type: object
| Field | Type | Required | Description and constraints |
|---|---|---|---|
delivered | boolean | required | |
reason | string | required | 'delivered' - a transport took the answer. 'no_pending_request' - nothing was pending under this request_id (already answered, expired (~60s), or unknown) - the answer was silently dropped (not an error; a stale retry lands here safely). one of delivered, no_pending_request |
On this page
