Menu
Your backend (X-Api-Key)
Create session
/v1/sessionsCreates a verification session. Call it from your backend; hand only sdk_url (or session_id + access_token) to the end user.
Authorization: X-Api-Key (your backend)
| FIELD | DESCRIPTION |
|---|---|
| applicant_external_id | string ≤ 255 — Your id for the user: use an internal id, not an email or name (it appears in the path of the applicant endpoints). Links repeat verifications to one applicant record; needed for reuse_if_verified, the applicant endpoints and erasure. |
| modules | array — ["document", "liveness"] (default) · ["document"] · ["liveness"]. See Modules and rules. |
| liveness_mode | string — active (default: 3–4 head movements, then a selfie) · passive (selfie only; lower assurance). WebSDK only for now. |
| document_types | array — Restrict the documents offered: id_card · passport · driving_license · residence_permit. Default: every type we can verify for the chosen country. |
| reuse_if_verified | boolean — true: if this applicant was approved in the last 180 days (no AML alert, the earlier approval covered the requested modules), the session returns approved at once. |
| expected_identity | object — The person you expect (first_name, last_name, date_of_birth YYYY-MM-DD, document_number; at least one). A mismatch sends the session to review, never approves it. |
| sandbox_outcome | string — Sandbox keys only: force the first decision to approved · declined · review. See Environments and testing. |
| delivery | object — We send the link for you: {"channel": "email|sms|whatsapp", "recipient": "…", "language": "fr"}. Paid modules, off until you enable them; SMS/WhatsApp are not available in sandbox. See Sending the link. |
| verify_contact | array — ["email"], ["sms"] or both: the flow asks the user for a one-time code. Uses email / phone from the same body if given (then locked). |
| email · phone | string — Contact details for the verify_contact step only (email ≤ 254, phone ≤ 32 characters, E.164). Sent without the matching channel in verify_contact they are refused with 403 module_disabled. |
| affiliate_id · click_id | string — Where the user came from (campaign, partner, ad click), for your own reporting: affiliate_id ≤ 64, click_id ≤ 128 characters, letters, digits and . _ : - only. Returned as given in Retrieve session and every session webhook (null if not sent). |
| metadata | object — Your own key/values, kept with the session and included in the data export. Not returned by Retrieve session or webhooks: keep your own copy. Our reserved keys (modules, document_types, white_label …) are removed. Do not put personal data here. |
Optional header Idempotency-Key (1–255 printable ASCII; a new UUID per new session): a retry with the same key and body returns the first session (201, Idempotent-Replayed: true) instead of opening and charging a second one. Same key with a different body: 422 idempotency_key_reused. While the first request is still running: 409 idempotency_key_in_use. A malformed key: 422 idempotency_key_invalid. Keys are scoped to your account and environment and expire after 24 hours. A replay returns the session's current status and a new access_token (the first one keeps working); delivery is null and the link is not sent again. A first request that failed does not store the key.
expires_at is when the session ends (60 min), not the access_token (15 min). sdk_url carries the token, so hand it over right before the user starts.
| ERROR | WHEN |
|---|---|
| 402 | Production balance is insufficient |
| 403 tenant_not_live | Production key before go-live |
| 403 module_disabled | The module for a verify_contact channel is off, or email / phone was sent without that channel in verify_contact |
422 {"code": "verification.…"} | verify_contact with an invalid or unserved email / phone (verification.recipient_invalid, verification.country_unavailable). No session is created |
422 {"code": "delivery.…"} | delivery cannot be sent: module off, invalid recipient, country not served, SMS/WhatsApp in sandbox. No session is created (Sending the link) |
| 422 | Invalid field; sandbox_outcome with a production key (sandbox_outcome_production); expected_identity on a liveness-only session (expected_identity_requires_document); liveness-only with applicant_external_id but no approved document session in the last 365 days (document_session_required); malformed Idempotency-Key (idempotency_key_invalid) |
| 429 | 300 requests/min per key, or 5 sessions/day for the same applicant_external_id |
curl -X POST https://api.idotta.com/v1/sessions \
-H "X-Api-Key: idv_test_XXXX" \
-H "Content-Type: application/json" \
-d '{
"applicant_external_id": "user-42",
"modules": [
"document",
"liveness"
]
}'// Response 201 (a reused approval returns "status": "approved")
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"access_token": "eyJ…",
"sdk_url": "https://verify.idotta.com/session/550e8400-…?token=eyJ…",
"status": "not_started",
"status_label": "Not Started",
"step": "created",
"environment": "sandbox",
"expires_at": "2026-09-20T13:00:00Z"
}