Error Codes
The API uses standard HTTP status codes to indicate the success or failure of a request. When an error occurs, a JSON response with an error
field will be returned.
Timeout
HTTP Status: 408 Request Timeout
This error is returned when the request exceeds the allowed processing time.
Example Response
{
"error": "Request timed out"
}
Missing Parameters
HTTP Status: 400 Bad Request
Returned when required parameters are missing from the request.
Example Response
{
"error": "Bad Request"
}
Unauthorized
HTTP Status: 401 Unauthorized
This response occurs when authentication credentials are missing or invalid (e.g. no API key or bearer token provided).
Example Response
{
"error": "Unauthorized"
}
Forbidden
HTTP Status: 403 Forbidden
This response is returned when the authenticated user does not have permission to perform the requested action.
Example Response
{
"error": "You are not authorized to perform this action"
}
Other Formats
While HTML responses include redirects and flash messages, the API will always return structured JSON errors for requests with Accept: application/json
.
General Recommendations
- Ensure your requests include all required parameters.
- Authenticate using a valid API key or bearer token.
- Verify that the authenticated user has access to the resource.
- Handle timeouts gracefully and consider retrying idempotent requests.