Skip to main content
Every non-2xx response from the API uses the same envelope. Branch on the HTTP status code and the error.type enum — never on error.message, which is human-readable and may change.

Envelope

Status code is the source of truth. The API will never return 200 OK with an error body. If your status check passes, the response is success.

Error types

The error.type enum: Additional type values (invalid_request_error, permission_error, idempotency_error) are reserved for endpoints that are not yet shipped.

Error codes shipped today

Examples

401 missing_api_key

422 invalid_query_parameter

422 conflicting_date_range

429 too_many_requests

Handling errors

A pragmatic client:

Request IDs

Every response carries a Request-Id header (e.g. req_01HK7GD3H6ZSQ0Y2A5B3C4DEFG). The same value appears in the error body’s requestId field. We retain request traces for 90 days — quote the ID in support emails to get the exact context of a failing call.