# `POST /v1/documents/verify` — Verify an identity document

The hosted document pipeline on photos you send: document type and country, MRZ and visual-zone fields, MRZ check digits, consistency and authenticity checks. No chip read, morph or face checks. Send each side flat and cropped to the document. Asynchronous: answers 202, then documents.verify.completed. CHF 1.20 when it reached a document outcome; refunded on a processing error or timeout. Needs the documents:verify scope. Photos are erased when the check ends.

Parameters:
- `Idempotency-Key` (header, string): Reuse on retries (printable non-space ASCII). For 24 hours the same key and the same request return the saved answer and check id without a second charge; a different request under the key returns 409.

Body:
- `country` (string, required): ISO 3166-1 alpha-2 or alpha-3.
- `document_type` (string, required) One of `PASSPORT`, `NATIONAL_ID`, `DRIVER_LICENSE`, `RESIDENCE_PERMIT`.
- `reference_id` (string): Your own id, echoed in the answer.
- `sandbox_outcome` (string): Sandbox keys only: which test answer to return. No model runs and nothing is charged. One of `pass`, `fail`, `review`.
- `front` (string, required): JPEG, PNG or WebP, at most 12 MB.
- `back` (string): Optional.

Responses:
- 202: Accepted. Poll the check or wait for its webhook.
- 400: Invalid input.
- 401: Missing, unknown or expired API key.
- 402: The balance does not cover the check.
- 403: The key lacks the product's scope, its IP allowlist refuses the caller, or (code production_not_allowed) the organization may not use production yet.
- 409: The Idempotency-Key is in progress (Retry-After: 1) or was used with a different request.
- 413: A file or the body is too large.
- 415: A file is not of an accepted type (checked by its bytes, not its name), or the body is neither multipart nor JSON.
- 429: More than 60 calls in a minute for this product.
- 503: The check could not run on our side. Nothing was charged; retry later with the same Idempotency-Key.
