Standard Error Response
Most errors return a JSON object with adetail field:
Validation Errors
Requests that fail input validation return a400 status code with field-specific error details:
Error Code Reference
| Status Code | Name | Description |
|---|---|---|
400 | Bad Request | The request body is invalid, malformed, or missing required fields. |
401 | Unauthorized | Authentication failed — the API key is missing, invalid, or expired. |
403 | Forbidden | The authenticated key does not have permission to perform this action. |
404 | Not Found | The requested resource does not exist or has been deleted. |
405 | Method Not Allowed | The HTTP method is not supported for this endpoint. |
409 | Conflict | The request conflicts with the current state of the resource (e.g., duplicate name). |
413 | Payload Too Large | The request body exceeds the maximum allowed size. |
429 | Too Many Requests | Rate limit exceeded. Back off and retry after the window resets. |
500 | Internal Server Error | An unexpected error occurred on the server. |
503 | Service Unavailable | The API is temporarily offline for maintenance or under heavy load. |
Detailed Error Descriptions
400 — Bad Request
The request is malformed or contains invalid data. Common causes:- Missing a required field in the request body
- Sending an invalid data type (e.g., string where an integer is expected)
- Malformed JSON in the request body
401 — Unauthorized
Authentication failed. Common causes:- No
X-Avala-Api-Keyheader included in the request - The API key is invalid or has been revoked
- The API key has expired
403 — Forbidden
The API key is valid but lacks permission for the requested action. Common causes:- Attempting to access a resource owned by a different organization
- Insufficient role or permission level for the operation
404 — Not Found
The requested resource does not exist. Common causes:- The resource ID is incorrect or misspelled
- The resource was previously deleted
- The URL path is wrong
405 — Method Not Allowed
The HTTP method is not supported on the endpoint. Common causes:- Sending a
PATCHrequest to an endpoint that only supportsGETandPOST - Using
DELETEon a resource that does not support deletion
409 — Conflict
The request conflicts with the current state of a resource. Common causes:- Creating a resource with a name that already exists
- Attempting a state transition that is not allowed (e.g., re-activating a completed run)
413 — Payload Too Large
The request body exceeds the maximum allowed size. Common causes:- Uploading a file that exceeds the size limit
- Sending an excessively large JSON payload
429 — Too Many Requests
You have exceeded the rate limit. Common causes:- Sending more than 100 requests per minute
- Exceeding concurrent upload or export limits
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
500 — Internal Server Error
An unexpected error occurred on the server. Common causes:- A bug or transient failure in the Avala backend
503 — Service Unavailable
The API is temporarily unable to handle requests. Common causes:- Scheduled maintenance
- The service is under heavy load
Handling Errors
Implement retry logic with exponential backoff for transient errors (429, 500, 503). Do not retry client errors (400, 401, 403, 404).
Python