Errors

Errors

One shape. Constant sentences. Every error is JSON with a sentence, a machine code and sometimes a request id. The sentences are fixed. They never echo an id, an email or an organisation name. Branch on code, not on the sentence, except for the one 409 that has no code.

Every code in version 1.

Status`code``error` sentenceWhat to do

400

bad_request

That request body could not be read.

The body is not valid JSON or is over the size cap (16,384 bytes for creates, 65,536 for task PATCH and chat). Fix it and send it again.

400

invalid_request

The resource's own fixed sentence. Examples: "Send the changes as a JSON object." "Unknown field: name." "Idempotency-Key is not supported on this endpoint yet." "There is too much linked data for one API read. Open it in the app instead."

The request is well formed but not allowed. Read the sentence.

401

unauthorized

This request needs a valid API key.

A missing or malformed bearer, an unknown, revoked or expired key, a suspended or removed issuer, an inactive organisation and a key sent in the query string all answer this. They are not told apart on purpose.

403

forbidden

This API key is not allowed to read this.

The key lacks the read scope. Collections only.

403

write_forbidden

This API key is not allowed to make this change.

The key lacks the write scope. See scopes.

404

not_found

No such record.

The id does not exist, belongs to another organisation or is refused. These three answers are byte for byte identical. A read of one record never answers 403.

405

method_not_allowed

Only GET is supported here. Or: Only GET and PATCH are supported here.

Use a method the route accepts. Some paths send an Allow header.

405

write_not_allowed

Only GET and POST are supported here.

Same.

409

none

idempotency-key-reused (the error field is this word, not a sentence)

The same Idempotency-Key came with a different body. Use a new key.

413

none

MCP only: The request body is too large.

The MCP body is over 65,536 bytes.

429

rate_limited

Too many requests. Try again shortly.

Wait for Retry-After seconds. See rate limits.

Constant on purpose.

  • An unknown id, another organisation's id and a refused id answer the same 404. You cannot probe for other organisations' records.

  • Every kind of bad credential answers the same 401.

  • A read never answers 403 for one record. Scope failures are on collections and on writes.

  • Error sentences never contain an id, a tenant name or a value you sent.

A short checklist.

  • Retry 429 after Retry-After. Retry 5xx with a growing delay.

  • Do not retry 400, 401, 403, 404 or 405 without changing the request.

  • Retry creates only with an Idempotency-Key on the three paths that honour one.

  • Log requestId with every failure.

Two doors with their own errors.