API docs
Errors
Every non-2xx response is:
{"error":{"code":"<machine_code>","message":"<human description>"}}
| Status | Code | Meaning / fix |
|---|---|---|
| 401 | invalid_api_key | Missing, malformed, revoked, or unknown key. |
| 402 | insufficient_credits | Wallet can’t cover the call — top up. |
| 403 | missing_scope | Read-only key on a write endpoint. |
| 403 | api_not_enabled / webhooks_not_enabled | Plan lacks the feature — upgrade. |
| 404 | not_found | No such resource in your workspace. |
| 404 | transcript_not_available / recording_not_available | Not available for this call. |
| 409 | contact_exists | Duplicate phone; response includes existing_id. |
| 409 | subscription_limit_reached | Max 5 active webhook subscriptions. |
| 409 | subscription_not_active | Test events need an Active subscription. |
| 409 | not_cancelable | Only queued call requests can be canceled. |
| 422 | validation_error | Missing/invalid fields (message says which). |
| 422 | invalid_phone | to (POST /calls) or phone_e164 (opt-outs) must be E.164, e.g. +9198xxxxxxxx. A malformed phone_e164 on POST /contacts returns validation_error instead. |
| 422 | invalid_agent / invalid_contact / contact_phone_mismatch | Bad references in POST /calls. |
| 422 | recipient_dnd / consent_withdrawn | The number is opted out / consent withdrawn. |
| 422 | outside_calling_hours | Outside the permitted calling window — pass schedule_if_outside_hours: true to queue for the next window. |
| 422 | invalid_url / no_events / invalid_event_type | Webhook subscription validation. |
| 422 | invalid_status / invalid_action | PATCH /webhook-subscriptions/{id} — status may only be active or paused. |
| 429 | rate_limited | Too many requests — honor Retry-After. |