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.
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"
}
}404
No call with this ID on this API key.
application/json
notfound
{
"detail": "Call not found"
}422
unsupported_mode (mode is not accepted on this deployment: send a plain answer), or the standard validation list.
application/json
unsupportedmode
{
"detail": {
"error": "unsupported_mode",
"message": "Send a plain answer without mode."
}
}503
transport_error: the answer could not be delivered to the call. Retry shortly.
application/json
transporterror
{
"detail": {
"error": "transport_error",
"message": "The answer could not be delivered. Retry."
}
}Schemas
AnswerRequest
Type: object
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 say to the operator. Mutually exclusive with outcome. |
mode | string | optional | 'voice' (default): the bot speaks answer aloud to the operator. It is the only accepted value for an answer: an answer sent with 'context' is refused with 422 unsupported_mode and the question stays open. An outcome ignores the mode.one of voice; default voice |
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 (when omitted, the answer goes to the oldest pending question). |
AnswerResponse
Type: object
| Field | Type | Required | Description and constraints |
|---|---|---|---|
delivered | boolean | required | True if a transport was actively waiting on this call_id when the answer arrived. False means the ask_user already timed out, the call ended, or no ask_user was pending: the answer is dropped without an error. |
reason | string | required | 'delivered': a transport took the answer. 'no_pending_request': nothing was pending under this request_id (already answered, expired after about 60s, or unknown), so the answer was dropped. This is not an error; a stale retry lands here safely. one of delivered, no_pending_request |
On this page
