Error responses
When a request fails, the API returns an error object with a type, an HTTP status, a message, and a request id.
Error response format
A failed request returns this object:
Error response format
{
"status": "error",
"error": {
"type": "<type of error>",
"code": <HTTP status code>,
"message": "<error message>",
"request_id": "<unique request identifier>"
}
}
- type: The category of the error (like input_validation_error or authorization_error).
- code: The HTTP status code associated with the error.
- message: A human-readable explanation of what went wrong.
- request_id: A unique identifier for your request, handy for troubleshooting with our support team.
Common error types
- Input validation error (input_validation_error): Something is wrong with the data you sent. Check the request payload.
- Authorization error (authorization_error): Authentication failed. Check your credentials.
- Forbidden error (forbidden_error): You are authenticated, but you don't have permission to do that.
- Bad request (bad_request): The server couldn't understand your request. Something is missing or formatted wrong.
- Internal server error (internal_server_error): Something went wrong on our side.
What to do when you get an error
- Read the message: The error message often says what is wrong.
- Check your request: Do this first for an input validation error.
- Keep the request id: Send it to support if you need help with that request.
- Contact support: Include the request id in your message.