Errors
How the API refuses a request, and what each status means.
A refusal is a JSON body with a status:
{ "error": "Project not found" }error is a sentence for a person, in the request's language (see Languages). Some refusals add details beside it — a form refused field by field carries its messages under fields:
{
"error": "Invalid form",
"fields": { "0199f2a4-…": "Add a photo." }
}Don't parse error: it changes with the language. Branch on the status.
| Status | Meaning |
|---|---|
400 | The body or query is malformed, or a field is invalid. |
401 | No session, or an invalid API key. |
403 | You may not do this here: your role, your permission profile, the key's permissions, or the organization requires two-factor. |
404 | Not found — or not visible to you. A project you are not on answers exactly like one that does not exist. |
409 | It conflicts with the current state: a duplicate name, a list that changed since you read it. |
413 / 415 | An upload too large, or of a type not accepted. |
422 | Well formed, but refused; per-field messages under fields where there are any. |
429 | Too many requests. |
500 | Our fault. The body is plain text. |
The authentication routes
The routes under /api/auth, and a few organization routes that pass their answer through, refuse in a shape of their own — { "code": "…", "message": "…" }, in English. Branch on code. Those operations list the AuthError schema among their responses.
