Errors

The Callr API uses standard HTTP response codes to indicate the outcome of each request.

HTTP status codes

CodeDescription
200Everything worked as expected.
201An object was successfully created.
202The request was accepted and is processed asynchronously (see Tasks).
204Everything worked as expected (empty response).
400Bad Request: a parameter is missing, has the wrong type, or has an invalid value.
401Unauthorized: the API key is missing or invalid (see Authentication).
402Payment Required: your prepaid account has insufficient credit.
403Forbidden: you are authenticated, but the action is not allowed (Build Mode, account limits, archived or disabled account...).
404Not Found: the requested resource does not exist.
405Method Not Allowed.
409Conflict: the resource already exists (for example a duplicate webhook endpoint, or a number already assigned).
429Too Many Requests: you exceeded the rate limit.
500Internal error on Callr's side (should not happen).

Error response

Errors return a JSON object:

{
  "code": "value_error",
  "message": "Invalid value: to"
}

Error codes

codeHTTP statusExample message
bad_request, value_error400Invalid value: <property>, Missing required property: <property>
auth_error401Authentication failed
payment_required402Your account has insufficient credit
forbidden403Your 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_found404The requested resource was not found
duplicate409The endpoint already exists
http_error405, 429, ...Rate limit exceeded (11/10)
internal_error500Internal Server Error
📘

Handle errors with the HTTP status and code

message is meant for humans and may change. Base your error handling on the HTTP status code and the code field.