Error Handling
All API errors follow a consistent JSON structure.
Error response format
{
"error": {
"code": "resource_not_found",
"message": "The requested resource could not be found.",
"request_id": "req_abc123"
}
}
HTTP status codes
| Status | Meaning |
|---|---|
400 | Bad Request — invalid parameters |
401 | Unauthorized — missing or invalid token |
403 | Forbidden — insufficient permissions |
404 | Not Found — resource does not exist |
422 | Unprocessable Entity — validation error |
429 | Too Many Requests — rate limit exceeded |
500 | Internal Server Error — something went wrong on our side |
Rate limiting
Responses include the following headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1710000000
When you hit the rate limit, wait until X-RateLimit-Reset (Unix timestamp) before retrying.