Errors and status codes

Status codes, error bodies and rate limit headers.

Status codes

API V1 returns standard HTTP status codes:

CodeNameMeaning
200OKThe request succeeded.
304Not ModifiedThe resource hasn't changed since your last request.
400Bad RequestThe request is malformed. The error body has the details.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe API key doesn't have the permission this endpoint needs.
404Not FoundThe URL is wrong, or the resource (for example a project) doesn't exist.
406Not AcceptableThe requested response format isn't supported.
422Unprocessable EntityThe request is well formed but has invalid values.
429Too Many RequestsYou exceeded the rate limit. Wait for the seconds in Retry-After.
500Internal Server ErrorSomething went wrong on our side. Contact [email protected] if it persists.

Error bodies

Error bodies are JSON. Most errors describe the rejected input in validationErrors:

{
  "error": null,
  "validationErrors": [
    {
      "field": "token",
      "errors": [
        {
          "code": "authentication.token.invalid",
          "description": "The token is invalid!",
          "parameters": {}
        }
      ]
    }
  ]
}

Errors that aren't about a specific field use error instead:

{
  "error": {
    "code": "…",
    "description": "…",
    "status": "…"
  },
  "validationErrors": null
}

Use code in your error handling; description is meant for people. A few errors, such as a missing resource or an unexpected server error, return a short body with a message field instead.

Rate limit headers

Responses carry the current rate limit budget of your workspace:

HeaderMeaning
X-RateLimit-LimitSize of the request budget.
X-RateLimit-RemainingRequests left right now.
X-RateLimit-RefillRateRate at which the budget refills.
Retry-AfterOn 429: seconds to wait before you retry.

Did this page help you?