Skip to main content

HTTP response codes

Every response comes with an HTTP status code that tells you whether the request succeeded. Codes in the 2xx range mean success, 4xx codes mean a problem with the request, and 5xx codes mean a problem on our side. See the full list of HTTP status codes on MDN.

Error codes​

Status codeDescription
400 Bad RequestThe request is incorrect. Check that the parameters match the format described on the endpoint page.
401 UnauthorizedThe API key is missing, invalid or expired.
403 ForbiddenThe API key's scope doesn't allow this request (a write with a Read Only key, a read with a Write Only key), or the request comes from an IP address that isn't whitelisted. See Token authentication.
404 Not FoundThe resource you requested doesn't exist.
429 Too Many RequestsYou have reached the rate limit.
500 Internal Server ErrorSomething unexpected happened on our side. Try again, or contact support if it keeps happening.
502 Bad GatewayA server between you and the API received an invalid response. Try again.
504 Gateway TimeoutA server between you and the API didn't get a response in time. Try again.

Errors any endpoint can return​

401, 429, 500, 502 and 504 can come from any endpoint, so endpoint pages don't repeat them. A missing or invalid API key returns 401 Unauthorized with this body:

{
"detail": "Invalid token."
}

Check the Authorization: Token <your_64_char_api_key> header. See Token authentication.

Handle errors by status code​

StatusMeaningWhat to do
200 / 201SuccessContinue.
400Validation errorRead the error body, fix the request. Don't retry without changes.
401UnauthorizedCheck the API key, and whether it has expired.
403ForbiddenCheck the API key's scope (a Read Only key can't create, change or delete; a Write Only key can't read) and the IP whitelist.
404Not foundThe record you refer to doesn't exist. Create it first.
429Rate limitedWait and retry. See Rate limits.
500Server errorRetry with backoff. Contact support if it keeps happening.

How error bodies look is described in Error response formats, and the errors integrations hit most often in Common errors.