The Callr API uses standard HTTP response codes to indicate the outcome of each request.
HTTP status codes
| Code | Description |
|---|---|
| 200 | Everything worked as expected. |
| 201 | An object was successfully created. |
| 202 | The request was accepted and is processed asynchronously (see Tasks). |
| 204 | Everything worked as expected (empty response). |
| 400 | Bad Request: a parameter is missing, has the wrong type, or has an invalid value. |
| 401 | Unauthorized: the API key is missing or invalid (see Authentication). |
| 402 | Payment Required: your prepaid account has insufficient credit. |
| 403 | Forbidden: you are authenticated, but the action is not allowed (Build Mode, account limits, archived or disabled account...). |
| 404 | Not Found: the requested resource does not exist. |
| 405 | Method Not Allowed. |
| 409 | Conflict: the resource already exists (for example a duplicate webhook endpoint, or a number already assigned). |
| 429 | Too Many Requests: you exceeded the rate limit. |
| 500 | Internal error on Callr's side (should not happen). |
Error response
Errors return a JSON object:
{
"code": "value_error",
"message": "Invalid value: to"
}Error codes
code | HTTP status | Example message |
|---|---|---|
bad_request, value_error | 400 | Invalid value: <property>, Missing required property: <property> |
auth_error | 401 | Authentication failed |
payment_required | 402 | Your account has insufficient credit |
forbidden | 403 | Your account is in trial mode, you are not allowed to use this feature, This number is not a testing number, please add it on app.callr.com, You have reached the limit of this resource |
not_found | 404 | The requested resource was not found |
duplicate | 409 | The endpoint already exists |
http_error | 405, 429, ... | Rate limit exceeded (11/10) |
internal_error | 500 | Internal Server Error |
Handle errors with the HTTP status andcode
messageis meant for humans and may change. Base your error handling on the HTTP status code and thecodefield.
