Menu
Get started
Errors
Errors use the HTTP status code; the body is JSON with a detail field in one of three shapes. Branch on the status code first, then on the code inside.
Text
// A message
{ "detail": "Invalid API key" }
// A machine-readable code (+ details)
{ "detail": { "reason": "document_type_not_allowed", "allowed": ["passport"] } }
{ "detail": { "code": "tenant_not_live", "message": "Tenant is not approved for production; …" } }
// Field validation (422)
{ "detail": [ { "type": "missing", "loc": ["header", "X-Api-Key"], "msg": "Field required" } ] }| STATUS | MEANING | WHAT TO DO |
|---|---|---|
| 400 | Bad request (e.g. webhook test without a secret) | Fix the request |
| 401 | Missing, unknown or revoked API key; or a session token that does not work (code below) | Check the key; for a session token see the codes below |
| 402 | Production balance is insufficient | Top up in Panel → Balance |
| 403 | tenant_not_live; a module that is switched off (module_disabled) | Use a sandbox key, or switch the module on in the panel |
| 404 | No such session or applicant for this key and environment | Check the id and the key's environment |
| 409 | Wrong state for this step (upload before document details, retry after a final decision …) | Retrieve the session and follow its status |
| 413 · 415 | Image too large / not an image | See Upload document images |
| 422 | Invalid field or a rule (detail.reason) | Fix the input; do not retry unchanged |
| 429 | Rate or daily limit (Limits); body {"error": …} or {"detail": "Velocity limit …"} | Back off; daily limits reset over 24 h |
| 5xx | Our side | Retry with backoff; with Idempotency-Key a retried Create session is safe |
Session token errors (401)
The SDK steps answer 401 with {"detail": {"code": …, "message": …}}. Only session.expired means the session ended (the panel shows it as Expired); in every other case the session may still be running and your backend can issue a new link.
| CODE | MEANING | WHAT TO DO |
|---|---|---|
| token.missing | No Authorization: Bearer … header | Send the session's access_token |
| token.invalid | Not a token we issued, or no such session | Check the token |
| token.expired | The token's 15 minutes are over; the session is still running | Issue a new link with POST /v1/sessions/{id}/sdk-link |
| token.replaced | A newer link was issued for this session (sdk-link, or a delivered link was opened) | Use the newest link |
| session.expired | The session expired (expired / abandoned) | Create a new session |