Skip to content

Answer a mid-call question

POST /calls/{call_id}/answer

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

Open in playground

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

NameLocationRequiredTypeDescription and constraints
call_idpathrequiredstring

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.

FieldTypeRequiredDescription and constraints
answerstring (length 1 to 4000) | nulloptionalFree text the bot will dictate to the operator (mode=voice, the default) or act on silently (mode=context). Mutually exclusive with outcome.
outcomestring (one of timeout, transport_failure) | nulloptionalClosed client-side outcome when the observed ask_user request cannot receive an answer. Requires request_id. Mutually exclusive with answer.
request_idstring (max length 64) | nulloptionalDisambiguates 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).
modestringoptional'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

FieldTypeRequiredDescription and constraints
deliveredbooleanrequired
reasonstringrequired'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