PLATFORM

Errors & limits

The API uses conventional HTTP status codes and returns a consistent error body with a machine-readable code, so you can branch on failures reliably instead of parsing prose.

The error object

{
  "error": {
    "type": "invalid_request",
    "code": "invalid_phone_number",
    "message": "The 'to' value is not a valid E.164 phone number.",
    "param": "to",
    "request_id": "req_01HN9Z..."
  }
}
FieldDescription
typeBroad category: invalid_request, authentication, rate_limit, api_error.
codeStable, specific identifier to branch on in code.
messageHuman-readable explanation. For logs and debugging, not for end users.
paramThe offending field, when applicable.
request_idMatches the X-Request-Id header. Quote it to support.

HTTP status codes

CodeMeaning
200 / 201Success. 201 when a resource was created.
400Malformed request — invalid JSON or missing body.
401Missing or invalid API key.
403Authenticated, but not allowed to do this.
404No such resource.
409Conflict — e.g. an idempotency key reused with a different payload.
422Valid JSON but a field failed validation (see param).
429Rate limited. Back off and retry (see below).
500 / 503Something went wrong on our side, or a temporary outage. Safe to retry with backoff.

Common error codes

CodeMeaning
invalid_phone_numberA number wasn't valid E.164.
unsupported_routeNo route to that destination for the channel/number type.
sender_not_allowedThe from isn't permitted in the destination market.
recipient_opted_outThe recipient previously sent STOP; the send was blocked.
domain_not_verifiedEmail from domain isn't verified for a live key.
rate_limitedToo many requests; retry after the window.
insufficient_balanceAccount balance can't cover the request.

Rate limits

Limits are applied per API key and per endpoint group. Every response includes your current standing so you can pace yourself before hitting a wall:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1782475260

Exceeding a limit returns 429 with a Retry-After header (seconds). If you expect sustained high throughput — a campaign or a seasonal peak — arrange dedicated throughput ahead of time rather than relying on burst headroom.

Retries & idempotency