Using the API
Errors
The error shape and every error code.
Every error has the same shape: an HTTP status, and a body with a stable code and a message for people.
{
"error": {
"code": "missing_scope",
"message": "This key can't do that: it needs the audits:write scope",
"scope": "audits:write"
}
}
Check code, not message: messages may change, codes won't.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A parameter or field isn't valid. The message says which. |
| 400 | invalid_body | The body isn't valid JSON, or has a field the endpoint doesn't know. |
| 401 | key_required | No API key was sent. |
| 401 | key_invalid | The key is wrong, expired or revoked. |
| 403 | missing_scope | The key doesn't have the scope this needs (error.scope). |
| 403 | plan_no_api | The account's plan doesn't include the API. |
| 403 | plan_limit | A plan limit: sites, audits this month, concurrent audits or scans today. |
| 404 | not_found | It doesn't exist, or it isn't yours. |
| 409 | audit_running | The site already has an audit queued or running. |
| 409 | audit_finished | The audit has already finished, so it can't be cancelled. |
| 422 | consent_required | The site isn't verified: send "consent": true to confirm you're allowed to audit it. |
| 429 | rate_limited | Over your requests a minute. See Retry-After. |
| 429 | rate_limited_daily | Over your requests a day. |
| 500 | internal | Something went wrong on our side. It's logged; try again shortly. |