Create sandbox session

AI Tools

The first step for integrating with the sandbox is to create the age verification session using the generated token for the authentication.

Endpoint

POST https://age.yoti.com/sandbox/api/v1/sessions

Headers

Headers

Description

Authorization

Access token to call the Sandbox API. Should be sent as a Bearer {{access_token}}.

Content-Type

application/json

Yoti-SDK-Id

Your unique Yoti-Sdk-Id (UUID), obtained from the Yoti Hub

Request Body

In the request body, you need to provide the methods you would like to enable, the allowed age threshold, and your client preferences.

{ "type": "OVER", "ttl": 900, "age_estimation": { "allowed": true, "threshold": 21, "level": "PASSIVE", "retry_limit": 1 }, "digital_id": { "allowed": true, "threshold": 18, "retry_limit": 1 }, "doc_scan": { "allowed": true, "threshold": 18, "authenticity": "AUTO", "level": "PASSIVE", "preset_issuing_country": "GBR", "retry_limit": 1 }, "credit_card": { "allowed": false, "retry_limit": 1 }, "mobile": { "allowed": false, "retry_limit": 1 }, "reference_id": "over_18_example", "callback": { "auto": true, "url": "https://www.yoti.com" }, "notification_url": "https://yourdomain.example/webhook", "cancel_url": "https://www.yoti.com", "retry_enabled": true, "resume_enabled": true, "synchronous_checks": true }

More details on the create session request can be found in here

Response Body

{ "id": "813b9f67-de9a-464e-bb46-40b4465c691f", "status": "PENDING", "expires_at": "2026-07-25T20:27:00Z" }

The response will send back a session id that will need to be used in subsequent API calls as well as the session expiry date and the current status of the session.