Skip to content
Kritano Docs
Menu

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.

StatusCodeMeaning
400invalid_requestA parameter or field isn't valid. The message says which.
400invalid_bodyThe body isn't valid JSON, or has a field the endpoint doesn't know.
401key_requiredNo API key was sent.
401key_invalidThe key is wrong, expired or revoked.
403missing_scopeThe key doesn't have the scope this needs (error.scope).
403plan_no_apiThe account's plan doesn't include the API.
403plan_limitA plan limit: sites, audits this month, concurrent audits or scans today.
404not_foundIt doesn't exist, or it isn't yours.
409audit_runningThe site already has an audit queued or running.
409audit_finishedThe audit has already finished, so it can't be cancelled.
422consent_requiredThe site isn't verified: send "consent": true to confirm you're allowed to audit it.
429rate_limitedOver your requests a minute. See Retry-After.
429rate_limited_dailyOver your requests a day.
500internalSomething went wrong on our side. It's logged; try again shortly.