Docs menu

Reference

API errors and limits

The error body every API request can return, its codes, the request limits for a key, and how dates and sites are given.

On this page 3 sections

These rules hold for every request in the API reference. Authenticate with an API key as a bearer token.

Errors

An error answers with the status and Content-Type: application/problem+json:

{
  "type": "about:blank",
  "title": "Unprocessable content",
  "status": 422,
  "code": "validation_failed",
  "detail": "Invalid input",
  "errors": [{ "field": "/from", "message": "Invalid ISO date" }],
  "requestId": "01J..."
}

Branch on code, not detail. Quote requestId when asking for help.

Status code Meaning
401 unauthenticated No key, or one that is wrong, expired or revoked. detail starts This API key is wrong, This token is wrong or Send an API key. type links to this section.
403 forbidden Not in the API reference, a missing scope, or outside the key's products.
403 hidden_area A report area your role cannot see.
404 not_found No such site or record, or one the key cannot reach.
413 body_too_large The body is over 64 KiB.
422 validation_failed A parameter or body field is wrong. errors lists each by JSON pointer.
429 rate_limited Over the key's allowance. Wait for Retry-After seconds.

Limits

  • Each key can make 300 requests a minute, and 30 a minute that change something. Refused requests count too.
  • A request over the allowance gets 429 with Retry-After in seconds.
  • One report request reads at most 400 days.

Sites and dates

  • siteId is the site's id, from GET /api/v1/sites.
  • Dates are YYYY-MM-DD in the site's time zone. to is included. Give compareFrom and compareTo together to compare with another range.