Skip to main content
When the API encounters an error, it returns a consistent JSON error response with details about what went wrong.

Error Response Format

All error responses follow this structure:
string
A machine-readable error code for programmatic handling
string
A human-readable description of what went wrong
string
The category of error (validation_error, authentication_error, etc.)

Error Types

Validation Errors (400)

Returned when the request contains invalid data.

Authentication Errors (401)

Returned when authentication fails.

Resource Errors (404)

Returned when a requested resource doesn’t exist.

Conflict Errors (409)

Returned when the request conflicts with current state.

Payload Errors (413)

Returned when the request body is too large.

Rate Limit Errors (429)

Returned when you’ve exceeded your rate limit.

Server Errors (5xx)

Returned when something goes wrong on our end.

Handling Errors


Best Practices

For 429 and 5xx errors, implement retry with exponential backoff:
Always log the full error response for debugging:
  • Error code and message
  • Request ID (if provided)
  • Timestamp
  • Request details (endpoint, method, params)
  • Show user-friendly messages (not raw error codes)
  • Provide actionable next steps when possible
  • Don’t expose internal error details to end users