Errors and rate limits
Status codes
Section titled “Status codes”The API uses standard HTTP status codes. Each operation in the API reference lists the ones it returns and why.
| Status | Meaning |
|---|---|
200, 201, 202, 204 |
The request succeeded. 202 means the work continues asynchronously — a call being placed, a message being sent. |
400 |
The request is malformed or a parameter is missing or invalid. The body says which. |
401 |
The credentials are missing or wrong, or the path names an account they do not cover. |
402 |
Your balance is too low for a billable action, such as placing a call or sending a message. |
403 |
The credentials are valid but not allowed to do this. |
404 |
The resource does not exist, or it belongs to another account. |
409 |
The request conflicts with the resource’s current state — for example, changing a call that has already ended. |
429 |
You have exceeded your rate limit. See below. |
5xx |
Something failed on our side. Retry with backoff; contact support if it persists. |
Rate limits
Section titled “Rate limits”Requests are rate-limited per client IP address, at a rate set by your account’s plan. Every response carries the current state of your limit:
| Header | Meaning |
|---|---|
X-RateLimit-Limit |
Requests allowed in the current window. |
X-RateLimit-Remaining |
Requests left in the current window. |
X-RateLimit-Reset |
When the window resets, as a Unix timestamp in seconds. |
Over the limit, the API answers 429 Too Many Requests:
{ "success": false, "profile": "val", "message": "API rate limit exceeded for Your Account. Please upgrade your account for higher rate limit."}Wait until X-RateLimit-Reset before retrying. To raise your limit,
contact us.
Retries and idempotency
Section titled “Retries and idempotency”Calls and messages are billable. A request that timed out may still have
succeeded, so before you retry a POST that creates a call or message, list
recent calls or messages to check it was not created.