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"
}| Field | Type | Description |
|---|---|---|
| request_id | string | Correlation ID. Log this and quote it when contacting ActiveCalls support; it ties the call to our internal logs. |
| error_code | integer | Application-specific error category. Use this field for programmatic branching. It is stable across API releases. |
| error_message | string | Human-readable description, often including the offending value. Use it for operator and developer surfaces, not for production logic. |
HTTP status codes
| Status | Meaning | when it happens |
|---|---|---|
| 200 | success | The request completed successfully. |
| 400 | Bad Request | The request is invalid, or input is missing or malformed. |
| 401 | Unauthorized | The request is missing a valid API key. |
| 403 | Forbidden | The API key is valid, but does not have permission for the resource. |
| 404 | Not Found | The resource does not exist, or the endpoint path is invalid. |
| 429 | Too many requests | The request was rate limited. |
