Skip to main content

The envelope

Every refusal the API itself makes has one shape:
  • code is machine-readable. The reference’s x-known-codes lists the codes this version sends. A new code may be added at any time: handle an unknown code by its HTTP status.
  • message is for people. Never parse it.
  • request_id equals the X-Request-Id header. Quote it when you ask for help.
  • Every operation’s 200 and every enveloped refusal carries Cache-Control: no-store (the reference document at /public/v1/openapi.json does not).

Codes

A dead or stale source is always a 503, never an empty 200. Key management (/api/v1/developer/keys, used from the website) sends access_not_granted, tier_required, rate_limited, dependency_unavailable, not_found, invalid_request, scope_unavailable and key_limit_reached in the same envelope.

Example

Bodies that are not the envelope

A few answers come from the web server rather than the API, and are not enveloped: Treat any 5xx you cannot parse as internal_error.