Errors
Understanding and handling API errors in your application.
HTTP Status Codes
| Code | Type | Description |
|---|---|---|
| 400 | bad_request | The request was invalid or malformed |
| 401 | unauthorized | Invalid or missing API key |
| 403 | forbidden | API key lacks permission for this resource |
| 404 | not_found | The requested resource does not exist |
| 422 | validation_error | Request body failed validation |
| 429 | rate_limited | Too many requests, slow down |
| 500 | internal_error | An unexpected server error occurred |
| 503 | service_unavailable | The service is temporarily unavailable |
Error Response Format
All errors return a JSON object with details about what went wrong:
Response422
{
"error": {
"type": "validation_error",
"message": "Invalid parameter: limit must be between 1 and 100",
"param": "limit",
"code": "invalid_range"
}
}