Skip to main content

Error format

When a request fails, the API returns an error object with three fields:

Validation error example

When multiple fields fail validation, message is an array:

HTTP status codes

Handling errors in code

TypeScript / JavaScript

Python

Common mistakes

401 Unauthorized - Your API key is missing, malformed, or has been revoked. Check that you are passing Authorization: Bearer YOUR_API_KEY and that the key has not expired. 400 Bad Request on phone numbers - Phone numbers must be in E.164 format: + followed by the country code and number, with no spaces or dashes. For example, +919876543210 not 9876543210. 403 Forbidden on outbound destinations - The destination number is valid, but the route is not enabled for your workspace. Check Workspace Settings > Telephony Config for the destination country and network-group prefix, or use an enabled SIP/BYOC route. 404 Not Found - The resource ID is correct but the resource belongs to a different organization. All resources are scoped to the organization associated with your API key. 409 Conflict - You are trying to perform an action that is not valid for the current state of the resource. For example, registering a phone number that already exists or applying a status action that the resource cannot accept.

Retry decision table

See Reliability and retries for production-safe retry patterns and current platform guarantees.