Ana içeriğe geç

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

StatusMeaning
400Bad Request — invalid parameters
401Unauthorized — missing or invalid token
403Forbidden — insufficient permissions
404Not Found — resource does not exist
422Unprocessable Entity — validation error
429Too Many Requests — rate limit exceeded
500Internal 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.