Getting started
Errors
When something goes wrong, the API responds with the matching HTTP status and a body with code and message inside error.
Use the code in your program. The message is English text to help whoever is debugging, and it may change.
Error format404
{
"error": {
"code": "not_found",
"message": "Item not found or you do not have access to it."
}
}No key401
{
"error": {
"code": "missing_api_key",
"message": "Send your API key in the X-API-Key header or as Authorization: Bearer <key>."
}
}Error codes
| Status | Code | When it happens |
|---|---|---|
| 400 | key_in_query |
The key was sent in the URL (parameters api_key, apikey, key or token). Send it in the header and generate a new key, because the previous one may have been recorded in logs. |
| 400 | invalid_parameter |
A parameter has an invalid value, such as per_page above the maximum. |
| 401 | missing_api_key |
The request did not include a key. |
| 401 | invalid_api_key |
The key does not exist, was revoked, or its user is deactivated. |
| 404 | not_found |
The endpoint does not exist, or the item does not exist or belongs to an organization the user cannot see. |
| 404 | organization_not_found |
The organization given is not an organization where the user can see this type of item. |
| 405 | method_not_allowed |
The API only accepts GET (and HEAD). |
| 429 | rate_limited |
The rate limit was reached. Wait the number of seconds in Retry-After. |
| 500 | server_error |
Internal error. Try again in a moment; if it keeps happening, contact support. |
When to try again
Only repeat the same request after a 429 (waiting for Retry-After) or a 500. Other errors require a fix in the request or the key.