Error Handling

Every error response from the ActiveCalls API follows the same JSON envelope, regardless of the endpoint. This page explains that envelope, lists every error code, maps HTTP status codes to their meanings, describes retry strategies, and documents rate limits.

Error response format
All error responses are served with Content-Type: application/json. The body always contains three fields:

{
  "request_id":    "req_4d2a1b8c",
  "error_code":    1005,
  "error_message": "Invalid phone number: 0712345678"
}
FieldTypeDescription
request_idstringCorrelation ID. Log this and quote it when contacting ActiveCalls support; it ties the call to our internal logs.
error_codeintegerApplication-specific error category. Use this field for programmatic branching. It is stable across API releases.
error_messagestringHuman-readable description, often including the offending value. Use it for operator and developer surfaces, not for production logic.

HTTP status codes

StatusMeaningwhen it happens
200successThe request completed successfully.
400Bad RequestThe request is invalid, or input is missing or malformed.
401UnauthorizedThe request is missing a valid API key.
403ForbiddenThe API key is valid, but does not have permission for the resource.
404Not FoundThe resource does not exist, or the endpoint path is invalid.
429Too many requestsThe request was rate limited.