Errors

Understanding and handling API errors in your application.

HTTP Status Codes

CodeTypeDescription
400bad_requestThe request was invalid or malformed
401unauthorizedInvalid or missing API key
403forbiddenAPI key lacks permission for this resource
404not_foundThe requested resource does not exist
422validation_errorRequest body failed validation
429rate_limitedToo many requests, slow down
500internal_errorAn unexpected server error occurred
503service_unavailableThe 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"
  }
}