Errors
One error shape for every route, and what each code means.
Every error has the same shape:
{
"error": {
"code": "scan_active",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}codedoesn't change: write your code against it.messageis for people, in the account's language.detailsadds facts for some codes, like the limit and its window forrate_limited.request_ididentifies the request: give it to us when you ask for help.
Codes
| Status | Code | What it means |
|---|---|---|
| 401 | invalid_key | The key isn't valid, or it was revoked. |
| 401 | unauthenticated | No key, or not sent as Bearer. |
| 402 | entitlement_exceeded | The account's plan doesn't include the API. |
| 402 | usage_exhausted | Out of credits for this scan. |
| 404 | not_found | No such id on this account. Another account's ids answer 404 too. |
| 404 | no_scan | The location has no finished scan yet. |
| 404 | link_gone | The PDF link expired or is unknown. |
| 409 | scan_active | A scan is already running for this location. |
| 409 | scan_not_done | The scan hasn't finished yet. |
| 409 | report_running | A report is being made for this location. |
| 409 | too_many_webhooks | The account has the most webhook subscriptions it can have. |
| 422 | validation_error | A parameter or the body isn't valid. details.fields says which. |
| 429 | rate_limited | Over the key's limit a minute or a day. Wait the seconds in Retry-After. |
| 429 | safety_cap | Over a daily safety cap for starting scans. |
What to retry
- 429: wait the seconds in
Retry-After, then try again. - 409
scan_activeorreport_running: wait for the one running to finish. - Any other 4xx needs a change to the request.