To begin using the Age Verification Service, a session must first be created. The session ID from the Yoti session create response will be used to construct the user view URL. Result of the session can then be retrieved from webhook or the Get Session Result API.

Server
https://age.yoti.com

Sessions API endpoints

Server Variables

Bearer {{API_TOKEN}}

Session creation

A session represents one end-to-end request of the age verification service. The session identifier is in the create session request's response. Every time a user elects a method of age verification on your relying business app or website, you will need to create a session with Yoti to perform the checks.

Auth
Headers
Content-Typestring

Define the expected payload content type (always application/json).

Yoti-Sdk-Idstring

Relying party's SDK ID generated from the Yoti hub

pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$

Request Body

This payload will generate a session configuration object

objectobject
typestring

Enum: AGE,OVER,UNDER

Default: OVER

age_estimationobject

Configuration object for age estimation

allowedboolean

Enable the verification method to be available for the user to use.

Default: true

thresholdinteger

Age threshold for under/over age limits. We recommend for this threshold to be more than the age you want to set as your barrier to entry.

levelstring

The level of anti-spoofing for each age verification method. PASSIVE enables a passive liveness test for age estimation.

Enum: NONE,PASSIVE

Default: NONE

retry_limitinteger

Maximum times a user can try this method in a give session

Default: 3

doc_scanobject

Configuration object for doc scan

allowedboolean

To enable/disable the method

Default: ture

thresholdinteger

Age threshold for under/over age limits.

Default: 18

levelstring

The level of anti-spoofing for each age verification method. PASSIVE enables a passive liveness test and face match for IDV.

Enum: NONE,PASSIVE

Default: NONE

authenticitystring

Verification of the ID Document authenticity.

Enum: OFF,AUTO

Default: AUTO

digital_idobject

Configuration object for digital id

thresholdinteger

Age threshold for under/over age limits. We recommend this to be the exact age of the threshold you want to cover.

Default: 18

age_estimation_allowedboolean

Allows the Estimated age attribute to be used for the check.

Default: true

age_estimation_thresholdinteger

The difference between this value and the above threshold must be between 1 and 20 away. Anything else will return an error on session creation

Default: 21

credit_cardobject

Base configration object for verification methods

allowedboolean

Enable the verification method to be available for the user to use.

Default: true

retry_limitinteger

Maximum times a user can try this method in a session

mobileobject

Verify your user is over 18 using their mobile provider details.

allowedboolean

Enable the verification method to be available for the user to use.

Default: ture

retry_limitinteger

No of times that a user can retry using this method.

Default: 3

electronic_idobject

Use Swedish Bank ID (Sweden), Mit ID (Denmark) and Finnish Trust Network (Finland) in order to verify a user's age.

thresholdinteger

Age threshold for verification.

Default: 18

sub_methodsarray[string]

The different electronic ID options available to a user.

Enum: MIT_ID,SWEDISH_BANK_ID,FTN

la_walletobject

Configuration object for LA Wallet support

allowedboolean

Enable the verification method to be available for the user to use.

Default: true

retry_limitinteger

Maximum times a user can try this method in a give session

Default: 3

thresholdinteger

Age threshold for under/over age limits. We recommend this to be the exact age of the threshold you want to cover.

age_keyobject

Configuration object for Yoti keys

allowedboolean

Enable the verification method to be available for the user to use.

Default: true

authenticationboolean

False: When the Yoti user interface is launched we immediately check if the user has a token that matches the requirements set in the rule. If it matches, the user is immediately directed to the callback url. True: When users finish any of the Yoti age verification methods, they have the option to create a passkey. They can then use this yoti key to quickly pass any future age verification sessions that they need to undergo. If authentication is set to true, The Yoti user interface will be shown, the user can then select the yoti_key method to verify their age, or they can use another method in the UI.

Default: true

emailobject

Configration object for email

dataobject

Data to check

verified_emailstring

An email address that has already been verified

country_codestring

The country code indicateing where the headless data is expected to be located

ttlinteger

This is a value in seconds which is used to determine the expiry time of this session

maximum: 2592000

minimum: 60

reference_idstring

This is a value that can be passed as a means of reconcilliation of a result

callbackobject

Callback object to describe where and how a user's experienced should be managed after they have submitted age verification evidence

urlstring

The URL to redirect your user to after they complete age verification. The sessionId will be appended as a query parameter.

autoboolean

Setting auto to true will automatically redirect users after verification.

notification_urlstring

The URL where the results of an age verification should be sent. This endpoint must use HTTPS and accept POST requests for notifications.

pattern: ^https:.*

block_biometric_consentboolean

For several American states (currently Texas, Illinois and Washington US states*), the law mandates that you must collect the user’s specific consent to collect their biometric details for our liveness or face matching feature to be compliant with the US legislation. *and any other countries or states within countries If you choose to only request specific consent in the above "territories" you must provide details of the effective geo location software you use to prevent any individuals located in one of these territories accessing the Yoti service without prior giving specific consent. Setting to true bypasses this screen. We recommend keeping this value to default (false) to enable consent for all users.

Default: false

rule_idstring

Allows an age token rule ID to be specified. If a user has previously passed a Yoti age verification and did so by meeting the age threshold configured in your rule, the user will automatically redirect to the callback.

pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

cancel_urlstring

You can specify a cancel URL, if the user opens AVS and decides that they don't want to continue then they can be taken to a specific place rather than going back in the browser.

retry_enabledboolean

You can give the user the ability to retry verifying their age if an attempt fails. Webhooks are sent for each age verification attempt, so some could show up as "FAIL" even if the user eventually passes.

Default: false

resume_enabledboolean

Allows the user to resume a session (if the link is re-accessed). The user can be re sent the link if for instance the IDV session fails, so that they can retry.

Default: false

synchronous_checksboolean

If set to true, ensures that all methods have a result ready before the user is redirected to the callback URL. This primarily affects document checks and credit card checks as these are async.

Default: false

double_blindboolean

Apply a secondary anonymisation step using Digital ID/Yoti Key

Default: false

POST /api/v1/sessions
Copy
Responses
200

OK

objectobject

Response from a session creation request

idstring

Auto-generated session ID (UUID) for age verification

statusstring

Current status of the age verification session

expires_atdate-time

Session expiry time

400

Bad request - missing field, spoofing attempt detected, invalid validation methods, need to re-verify

401

Missing or unknown Yoti-Sdk-Id

403

Not allowed to use this session

Response
Copy

Session retrieval

Retrieve the configuration setup for a session. This will only include the information required by a UI to display the allowable flows and methods.

Auth
Headers
Yoti-Sdk-Idstring

Relying party's SDK ID generated from the Yoti hub

pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$

Accept-Languagestring

Accept-Language string

Path Params
sessionIdstring

The consumer's session id, created by the relying party server.

pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

GET /api/v1/sessions/{sessionId}
Copy
Responses
200

Session retrieved for client consumption

objectobject

Shared session object properties

idstring

Session ID

sdk_idstring

SDK ID

callbackobject

Callback object to describe how a user's experience should be managed after they have submitted age verification evidence

autoboolean

The flag that indicate whether users will be automatically redirected after verification.

typestring

Enum: AGE,OVER,UNDER

Default: OVER

statusstring

Current status of the age verification session

Enum: PENDING,COMPLETE,PROCESSING,ERROR,FAIL,CANCELLED,IN_PROGRESS

expires_atdate-time

Session expiry time

biometric_consent_requiredboolean

Determine if the UI should display a biometric required flow

Default: true

cancel_session_allowedboolean

Flag to indicate whether cancelling the session is allowed

Default: false

retry_enabledboolean

Flag to indicate whether the user has the ability to retry verifying their age if an attempt fails.

Default: false

resume_enabledboolean

Flag to indicate whether a user is allowed to retry after a fail / error status

Default: false

notification_urlstring

The URL where the results of an age verification should be sent.

cancel_urlstring

The URL for redirection upon user cancelling the session

reference_idstring

A string for your internal reference. Yoti does not use it, but returns this same string in the session result.

created_atdate-time

Session creation date and time

evidence_idstring

An ID related to a specific age verification attempt

rule_idstring

Rule ID for using Age Token

ageinteger

Exact age of the user if the session TYPE is configured to "AGE" else it will return as the threshold value

updated_atdate-time

Session last update time

biometric_consent_given_atdate-time

The time the user gives consent on biometric permission

synchronous_checksboolean

Should toggle the UI processing wait screen for asynchronous checks

Default: false

double_blindboolean

If this session should be run in double blind mode.

Default: false

404

Session not found

410

Session has expired for current check or invalid status

Response
Copy

Get the session result

Retrieve session results for an Age verification session

Auth
Headers
Yoti-Sdk-Idstring

Relying party's SDK ID generated from the Yoti hub

pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$

Path Params
sessionIdstring

The consumer's session id, created by the relying party server.

pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

GET /api/v1/sessions/{sessionId}/result
Copy
Responses
200

Session retrieved for relying party consumption

objectobject

Shared session object properties

idstring

Session ID

sdk_idstring

SDK ID

callbackobject

Callback object to describe how a user's experience should be managed after they have submitted age verification evidence

autoboolean

The flag that indicate whether users will be automatically redirected after verification.

typestring

Enum: AGE,OVER,UNDER

Default: OVER

statusstring

Current status of the age verification session

Enum: PENDING,COMPLETE,PROCESSING,ERROR,FAIL,CANCELLED,IN_PROGRESS

expires_atdate-time

Session expiry time

biometric_consent_requiredboolean

Determine if the UI should display a biometric required flow

Default: true

cancel_session_allowedboolean

Flag to indicate whether cancelling the session is allowed

Default: false

retry_enabledboolean

Flag to indicate whether the user has the ability to retry verifying their age if an attempt fails.

Default: false

resume_enabledboolean

Flag to indicate whether a user is allowed to retry after a fail / error status

Default: false

notification_urlstring

The URL where the results of an age verification should be sent.

cancel_urlstring

The URL for redirection upon user cancelling the session

reference_idstring

A string for your internal reference. Yoti does not use it, but returns this same string in the session result.

created_atdate-time

Session creation date and time

evidence_idstring

An ID related to a specific age verification attempt

rule_idstring

Rule ID for using Age Token

ageinteger

Exact age of the user if the session TYPE is configured to "AGE" else it will return as the threshold value

updated_atdate-time

Session last update time

biometric_consent_given_atdate-time

The time the user gives consent on biometric permission

synchronous_checksboolean

Should toggle the UI processing wait screen for asynchronous checks

Default: false

double_blindboolean

If this session should be run in double blind mode.

Default: false

401

Missing or unknown Yoti-Sdk-Id

404

Session not found

Response
Copy