Reference

Errors

Every REST error is a JSON body with a single error string (some responses add a hint):

{ "error": "Agent not found" }

Status conventions

StatusMeaningTypical causes
400Invalid requestMissing/malformed fields, bad JSON, invalid E.164
401UnauthorizedMissing/invalid Bearer token or API key
403ForbiddenSignature verification failed, out-of-scope key
404Not foundWrong id, or the resource belongs to another account
409ConflictNumber already assigned to another agent
429Rate limitedIncludes a Retry-After header (seconds)
502Upstream failureTelephony or TTS provider error — safe to retry
503Not configuredA capability's provider isn't set up on this deployment

Retry guidance

  • 429 — wait Retry-After seconds, then retry.
  • 502 — retry with backoff; use Idempotency-Key on calls and idempotency_key on messages so retries never double-dial or double-text.
  • 409 on numbers — release the number from its current agent first.

MCP errors

The MCP endpoint returns JSON-RPC 2.0 error objects ({"jsonrpc", "id", "error": {"code", "message"}}) with HTTP 200, per protocol convention. Auth failures surface as JSON-RPC errors, not HTTP 401s.