Skip to main content

Error envelope

A failed response uses a different shape from a success response — don’t reuse your success-parsing code for errors:

HTTP status codes

Common error scenarios

400 validation error

Happens when required fields are missing or a field type is wrong. error.message is an array — one entry per failing field:

401 missing key

Check that the X-API-Key header is actually present on the request.

404 invalid or expired key

An unrecognized or revoked key value returns 404, not 401:
A key past its expiresAt returns 400 with "message": "API key has expired" instead. In all three cases, check that X-API-Key is present, the value is the full key secret (not the publicKey), and the key hasn’t been revoked or expired.

403 scope denied

message always names the specific missing scope. Add it to your key:

429 rate limited

Implement exponential backoff and retry after the window resets. See Rate Limits — note that the enforced limit is currently a fixed platform-wide threshold, not the rateLimitPerMinute/rateLimitPerHour values you can set on a key.

Troubleshooting checklist

  1. Log the full request URL, method, headers (redact the key value), and response body.
  2. Check success and error.message in the response envelope.
  3. For 401/404/403 — re-read Authentication and verify key scopes.
  4. For 400 — compare your request body against the request body table in the endpoint’s documentation; remember error.message may be an array.
  5. For 500 — retry once. If the error persists, contact support with the endpoint, payload, and a timestamp.