Gamma API

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.

StatusMeaning
400The body or query is malformed, or a field is invalid.
401No session, or an invalid API key.
403You may not do this here: your role, your permission profile, the key's permissions, or the organization requires two-factor.
404Not found — or not visible to you. A project you are not on answers exactly like one that does not exist.
409It conflicts with the current state: a duplicate name, a list that changed since you read it.
413 / 415An upload too large, or of a type not accepted.
422Well formed, but refused; per-field messages under fields where there are any.
429Too many requests.
500Our 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.

On this page