Docs

Reference

Errors

Every error returns a stable machine-readable code, a human-readable message, and a request_id for support. Build retry logic against code, not the message.

Error shape

{
  "error": {
    "type": "invalid_request_error",
    "code": "identity_not_found",
    "message": "No identity with id 'person_xxx' in test mode.",
    "param": "person",
    "doc_url": "https://docs.valyd.id/errors#identity_not_found",
    "request_id": "req_8YQzL2pMxV1nRk"
  }
}

HTTP status codes

StatusMeaning
200OK — request succeeded.
201Created — resource created.
400Bad request — malformed or missing parameter.
401Unauthorized — missing, invalid, or revoked API key.
402Payment required — plan limit reached.
403Forbidden — key lacks scope for this resource.
404Not found — resource does not exist (or wrong mode).
409Conflict — idempotency key reused with different body.
429Too many requests — see Retry-After.
5xxServer error — safe to retry with backoff.

Retry guidance

Exponential backoff with jitter

Retry on 429 and 5xx with exponential backoff (start 250ms, cap 30s) plus ±20% jitter. Always include the original Idempotency-Key on retries.

Never retry 400, 401, 403, or 404 — these indicate a logic bug, not a transient failure.

Error codes

CodeStatusWhat happened
identity_not_found404The person ID doesn't exist in this mode (test vs live).
identity_already_verified409Already passed this check within the dedupe window.
face_match_failed200Returned in the body — request succeeded, check failed.
liveness_failed200The capture didn't pass liveness; prompt the user to retry.
license_expired200Credential found but past expiry. Includes expired_at.
license_unknown_jurisdiction400Pass an ISO 3166-2 region code (e.g. US-CA).
scope_insufficient403Token is missing the requested scope (e.g. license:nurse).
agent_not_authorized403The agent's policy doesn't permit this action.
agent_approval_required202Action queued pending human approval.
webhook_signature_invalid401Signature header failed verification — reject the event.
idempotency_conflict409Same key, different body within 24h.
rate_limited429Slow down. See Retry-After.
api_key_invalid401Key revoked, malformed, or wrong mode prefix.
internal_error500Our problem. Retry with backoff and contact support with the request_id.