Skip to main content
Batch Relay returns a flat JSON error envelope. Read code in client code and keep request_id when contacting support.
The hosted API returns 401 invalid_api_key when the bearer token is missing, unknown, revoked, or belongs to another API environment. Do not parse the human message to distinguish those cases.

Common public API codes

Managed asset errors

The pending managed-assets diagnostic rollout replaces generic source-fetch failures with source_fetch_failed (502). It distinguishes a non-2xx source response, timeout, unreachable host, and invalid media without exposing the upstream response body.

Other route-specific codes

Some dashboard, internal, Stripe-webhook, settlement, and template-render routes return more specific codes. The live OpenAPI document is the route-level contract. For an unexpected code, preserve the request_id and inspect the route’s documented response before retrying.