Auvral

API reference

POST/v1/sessions

Creates a verification session for one of your users and returns the URL they must open.

Call this from your backend. The x-api-key header is a secret and must never reach a browser.

The returned url is for one person and expires quickly, within minutes, and always before the session itself. Create the session at the moment you are about to show it, rather than ahead of time, and do not forward it, share it or reuse it for a second user.

The URL can be opened two ways:

  • Embedded, by passing it to AuvralVerification.init({ url }) from the web SDK. This is the usual integration.
  • As a plain link (a redirect, a button, an email). Set returnUrl so the user has somewhere to go when they finish.

The URL belongs to whoever opens it first; a second person opening the same link is turned away. Your own user may reopen it as often as they need (a refresh, a closed tab) and resumes where they stopped.

This endpoint always creates a new session. referenceId is your own identifier for the person and is never treated as an idempotency key: calling twice with the same referenceId gives you two independent sessions, both attached to the same identity in your dashboard.

Authorization

ApiKeyAuth
x-api-key<token>

Your organization's secret key, sk_auvral_test_… in sandbox or sk_auvral_live_… in live. Server-side only.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/sessions" \  -H "Content-Type: application/json" \  -d '{    "flowId": "3f1c9a52-4d7e-4b3a-9c21-8e5f6a0b7d34",    "referenceId": "user_8842"  }'
{  "statusCode": 201,  "data": {    "sessionId": "9b2f4c1e-7a83-4d06-b5f1-2c9e8d3a6047",    "url": "https://verify.example.com/c/Jk3nQ7pXsR2vLm9Ab4Cd1e?locale=en",    "expiresAt": "2026-08-25T15:42:11.084Z",    "referenceId": "user_8842",    "metadata": {      "orderId": "order-8841"    }  }}
GET/v1/sessions/{sessionId}

Returns where a session got to, as the server sees it. This is what your own backend should trust when it needs to know an outcome and the webhook is not there.

Webhooks stay authoritative; this is how you reconcile. Call it when a delivery is missing, when a nightly sweep finds a session you never heard back about, or when support asks about one user. Do not call it in a loop while a verification runs: nothing arrives sooner because you asked, and the browser-side signal is not proof either.

Sessions are short-lived. Once one has expired and been swept, the answer is rebuilt from the verification it produced, so a session that got as far as your user starting it keeps answering long after the session itself is gone. A session that expired without ever being started leaves nothing behind and answers 404.

The response carries no personal data, no document contents, no device information and no session credential. It is a status, not the verification record; for the verification itself use GET /v1/verifications/{id} below.

Authorization

ApiKeyAuth
x-api-key<token>

Your organization's secret key, sk_auvral_test_… in sandbox or sk_auvral_live_… in live. Server-side only.

In: header

Path Parameters

sessionId*string

The sessionId you were given when you created the session.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/sessions/9b2f4c1e-7a83-4d06-b5f1-2c9e8d3a6047"

{  "statusCode": 200,  "data": {    "sessionId": "9b2f4c1e-7a83-4d06-b5f1-2c9e8d3a6047",    "status": "collecting",    "submitted": false,    "closed": false,    "verificationId": null,    "result": null,    "referenceId": "user_8842",    "metadata": {      "orderId": "order-8841"    },    "createdAt": "2026-08-25T14:42:11.084Z",    "expiresAt": "2026-08-25T15:42:11.084Z"  }}

GET/v1/verifications/{id}

Returns one verification of your organization: its status, the session it came from, your own referenceId and metadata, and when it started and ended.

Use it to reconcile, the same way as the session read: after a webhook you cannot account for, or when you hold a verificationId from an earlier event and want the server's current answer. It is not a progress feed, and polling it while the checks run tells you nothing a webhook will not tell you sooner.

The response is an allow-list. The identity behind the verification, the flow version it ran, the step it is on and the checks it made are not part of this contract: they are in your dashboard, where a person can look at them.

Authorization

ApiKeyAuth
x-api-key<token>

Your organization's secret key, sk_auvral_test_… in sandbox or sk_auvral_live_… in live. Server-side only.

In: header

Path Parameters

id*string

The verificationId, which arrives in every verification webhook and in the session read once your user has started.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/verifications/6d1a7f34-5b28-4c90-8e13-9f2a4c7b0e56"
{  "statusCode": 200,  "data": {    "verificationId": "6d1a7f34-5b28-4c90-8e13-9f2a4c7b0e56",    "status": "VERIFIED",    "sessionId": "9b2f4c1e-7a83-4d06-b5f1-2c9e8d3a6047",    "referenceId": "user_8842",    "metadata": {      "orderId": "order-8841"    },    "flowId": "3f1c9a52-4d7e-4b3a-9c21-8e5f6a0b7d34",    "environment": "SANDBOX",    "startedAt": "2026-08-25T14:43:02.512Z",    "endedAt": "2026-08-25T14:47:39.310Z"  }}