Errors
One error shape for every endpoint, with stable codes.
Every error of /api/v1 has the same shape:
JSON
{ "error": { "code": "insufficient_scope", "message": "The API key does not have the scope this endpoint needs." } }code is stable and meant for your program; message is for people and may change; field names the parameter, header or body field when one is at fault.
| Code | Status | Meaning |
|---|---|---|
unauthorized | 401 | Missing, malformed, unknown, revoked or expired key or token. Every unknown key gets the same answer. |
forbidden | 403 | Not allowed (reserved; not used by v1 endpoints today). |
insufficient_scope | 403 | The key or token does not have the scope of the endpoint. |
plan_required | 403 | The business's package does not include the API (Scale) or the feature of the endpoint. |
rate_limited | 429 | More than 120 requests in 60 seconds for this key, or too many from your address. Wait for Retry-After seconds. |
not_found | 404 | The id does not exist in this business (or is not an id at all). |
invalid_request | 400, 422 | A parameter, header or body field is invalid; field names it when known. |
payload_too_large | 413 | The body is larger than the endpoint accepts. |
conflict | 409 | The same Idempotency-Key was used with a different request, or the first request with it is still running. |
Other endpoints
- OAuth (
/api/oauth/*) answers RFC 6749 errors:{ "error": "invalid_grant", "error_description": "…" }. - MCP (
/api/mcp) answers JSON-RPC errors:{ "jsonrpc": "2.0", "id": …, "error": { "code", "message" } }.
What to do
| Status | Retry? |
|---|---|
| 400, 404, 413, 422 | No. Fix the request. |
| 401, 403 | No. Check key, scope and package. |
| 409 | After a moment, with the same key (a request with it is still running) or with a new key (the body changed). |
| 429 | Yes, after Retry-After seconds, with jitter. |
| 5xx, network errors | Yes, with backoff. Writes only with an Idempotency-Key. |