Skip to main content
An error has an HTTP status and, in most cases, a machine-readable code. The body comes in one of four shapes, described in the API reference; read error.code, then code, then fall back to the status. The server SDKs do this for you and raise one exception type. These are request errors. Why a verification was declined is not an error: it is the verification’s reason, listed in Decision reasons.

Authentication

Creating a verification

Face re-verification

These come from POST /v1/verifications when you send reference_verification_id; see Face re-verification. The body is {"error": {"code", "message"}}. These come up only if you capture in your own UI. An upload is checked as soon as it arrives. If the image is not usable, the upload fails with 422 and a code the person can act on; ask them to retake it: DOCUMENT_OUTLINE_NOT_FOUND, DOCUMENT_TOO_FAR, DOCUMENT_PORTRAIT_NOT_FOUND and DOCUMENT_BACK_SAME_AS_FRONT are not sent for every workspace; handle them anyway.

Reading results and blocking

Erasing personal data

These come from DELETE /v1/verifications/{verification}/personal-data. Calling again is always safe: an erasure that already happened answers 200 with the erased verification.

Test outcomes

Webhook subscriptions

Any endpoint

Retrying safely with Idempotency-Key

POST /v1/verifications and POST /v1/webhook-subscriptions accept an optional Idempotency-Key header. Generate one per create, for example a UUID, and send the same key with every retry of that create:
  • Keys belong to the workspace and are kept for 24 hours.
  • A retry with the same key and the same request gets the first response again, status and body, with the header Idempotent-Replayed: true. Nothing new is created.
  • The same key with a different request (another body, path or query) is refused with 409 IDEMPOTENCY_KEY_REUSED. A change of X-Timestamp or signature alone does not make it different: sign each retry anew, as always.
  • While the first request is still running, the same key gets 409 IDEMPOTENCY_KEY_IN_PROGRESS with Retry-After: 1.
  • Responses 2xx and 4xx are kept and replayed. A 5xx is not: the retry runs again. After a 4xx, fix the request and send it with a new key.
  • Other endpoints ignore the header.
The server SDKs send a key with every create and reuse it across their own retries; you can pass your own.

When a request times out

  • Create: send it again with the same Idempotency-Key. Without a key, a second verification may be created; an unused one is never started, expires after seven days and is not billed: a verification is billed when it is submitted.
  • Webhook subscription: send it again with the same Idempotency-Key, or list the subscriptions to see whether it exists.
  • Consent: send it again; the same values answer 200.
  • Upload: upload again; the new image replaces the previous one of the same type and side.
  • Submit: send it again. If the first one went through, the second answers 422 INVALID_STATUS: read the verification to confirm it is submitted.
  • Erasure: send it again. If the first one went through, the second answers 200 with the erased verification.
Sign every retry with a new X-Timestamp: a timestamped signature other than for a GET is accepted once.

Handling errors well

  • Log the HTTP status, the code and the message.
  • Show the person a message for the upload codes above; show a generic message for everything else and fix the cause on your side.
  • Do not retry 4xx errors other than 429 unchanged: they fail again.