Error response format
Every error response follows a consistent envelope structure:| Field | Type | Description |
|---|---|---|
type | string | Broad error category for high-level handling. |
code | string | Machine-readable error code. Clients should switch on this value. |
message | string | Human-readable error message ending with a period. |
param | string or null | The request field that caused the error, if applicable. |
Error types
| Type | Description |
|---|---|
invalid_request_error | The request is malformed or contains invalid parameters. |
authentication_error | Authentication failed (missing or invalid API key). |
permission_error | The API key does not have permission for this operation. |
api_error | An internal or upstream service error occurred. |
Error codes
| Code | HTTP Status | Description |
|---|---|---|
parameter_missing | 400 | A required field is missing from the request body. |
parameter_invalid | 400 | A field value is malformed or not accepted. |
account_invalid | 400 | The account associated with the API key is misconfigured. |
authentication_required | 401 | Missing or invalid API key. |
permission_denied | 403 | Insufficient permissions for this operation. |
resource_not_found | 404 | The requested resource does not exist. |
resource_conflict | 409 | A resource with the given identifier already exists. |
service_unavailable | 503 | An external dependency is temporarily down. |