Errors and status codes
The HTTP status codes the REST API returns and the shape of an error response.
The REST API uses standard HTTP status codes to signal the outcome of a request. Always branch on the status code first, then read the body.
Status codes
| Status | Meaning |
|---|---|
200 OK |
The request succeeded; the body contains the result. |
201 Created |
A resource was created. |
204 No Content |
The request succeeded and there is no body to return. |
400 Bad Request |
The request was malformed or failed validation — for example a missing required parameter. |
401 Unauthorized |
The access token is missing, invalid or expired. Obtain a new token (see Quickstart). |
403 Forbidden |
The authenticated user does not have permission for this action. See the endpoint's Access requirement in the API reference. |
404 Not Found |
The resource, or the path, does not exist. |
429 Too Many Requests |
You have sent too many requests in a short period. Slow down, then retry, honouring the Retry-After header if present. |
500 Internal Server Error |
Something went wrong on the server. Retry, and contact support if it persists. |
503 Service Unavailable |
The service is temporarily unavailable. Retry after a short delay. |
Error body
When a request fails, the response often includes a JSON body with a human-readable Message:
{
"Message": "A search term must be provided."
}
Not every error returns a body, and the exact shape can vary by endpoint, so treat the HTTP status code as the source of truth and use the Message, when present, for logging and diagnostics rather than for control flow.
Tip: A
401usually means your access token has expired. Exchange your refresh token for a new access token and retry, rather than re-creating the API key.
Related
Section: REST API