Skip to main content
The API returns structured JSON for every error. Look at both the HTTP status and the code field — the status tells you the category, the code tells you exactly what happened.

Envelope

Every response — success or error — sets X-Request-Id. Capture it in your client logs so we can trace failures end-to-end.

Status codes

Common error codes

Plan limit response shape

When a write hits a plan cap, the error envelope is extended with upgrade_url, current_plan, used, and limit:
Clients can branch on code === "plan_limit_exceeded" and surface a “go upgrade” CTA pointing at upgrade_url. MCP-driven agents do the same in natural language — the message + upgrade URL are designed to be quoted verbatim.

Retrying

429 and 5xx responses are safe to retry. We recommend exponential backoff starting at 1 second, capped at 30 seconds, with jitter. 4xx errors other than 409 and 429 are deterministic — retrying without changing the request won’t help. For 409 idempotency_in_progress, a short wait + retry is the correct response.