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.

Bearer token authorization using API Key obtained from the Yoti Hub

Session creation

Create a session that can be used by a consumer, when a session is created, a reference ID can be provided to help you identify your customers.

Auth
Headers
Content-Typestring

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

Yoti-Sdk-Idstring

SDK ID obtained from the Yoti Hub

pattern: [a-zA-Z0-9\_\-]{14,40}

Request Body

This payload will generate a session configuration object

objectobject
typestring

Session type

Enum: AGE,OVER,UNDER

Default: OVER

age_estimationobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

digital_idobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

doc_scanobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

credit_cardobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

mobileobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

yoti_keyobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

electronic_idobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

la_walletobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

social_security_numberobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

us_florida_hb3object
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

double_anonymityobject
allowedboolean

Flag indicating the verification method is allowed

Default: true

thresholdinteger

The age of interest

multipleOf: 1

maximum: 100

minimum: 6

Default: 18

emailobject
dataobject

Data to check

verified_emailstring

An email address that has already been verified

country_codestring

The two-letter ISO 3166-1 alpha-2 country code indicateing where the headless data is expected to be located

ip_addressstring

An IP address that is used as part of the risk assessment of headless data

singpassobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

cpfobject
allowedboolean

Flag indicating whether this method is allowed

Default: true

thresholdinteger

Configure the age verification threshold for this check.

retry_enabledboolean

Flag indicating whether retry is allowed for this method

Default: false

retry_limitinteger

Maximum times a user can attempt using this method

multipleOf: 1

maximum: 10

minimum: 1

ttlinteger

Define how long the session is valid for. The user will need to complete the session before the ttl expires.

multipleOf: 1

maximum: 2592000

minimum: 60

reference_idstring

Reference ID is an optional string. Yoti returns this same string in the session result. We recommend that you do not include any personal information in this string.

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

A https endpoint to call after a final result has been generated. This will be a post message containing the result and referenced_id

pattern: ^https:.*

block_biometric_consentboolean

Determine if the UI should block the display of a biometric required flow

Default: false

rule_idstring

The id in of the rule the age token must satisfy. Should be a uuid.

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

URL where end users get redirected when they decide to cancel current AVS session

privacy_policystring

URL for privacy policy

terms_and_conditionsstring

URL for terms and conditions

retry_enabledboolean

Ability for the user to retry verifying their age if an attempt fails

Default: false

resume_enabledboolean

Should a user be allowed to retry after a fail / error status

Default: false

blocked_locationsarray[string]

A list of locations that have been blocked for access

target_origin_urlstring

A http url that specifies the i-frame parent in order to dispatch status update event

pattern: ^http[s]?:.*

synchronous_checksboolean

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

Default: false

account_idstring

An identifier external to age.yoti.com that allows a client to distiniguish between different accounts under the same sdk id

maxLength: 100

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

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 retrival

Retrieve the configuration setup for a session.

Auth
Headers
Yoti-Sdk-Idstring

SDK ID obtained from the Yoti Hub

pattern: [a-zA-Z0-9\_\-]{14,40}

Path Params
sessionIdstring

The consumer's session id, created by the Yoti 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
idstring

Session ID created by Yoti server

sdk_idstring

SDK ID obtained from the Yoti Hub

callbackobject

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

autoboolean

Setting auto to true will automatically redirect users after verification.

typestring

Session type

Enum: AGE,OVER,UNDER

Default: OVER

statusstring

only sessions with a status of PENDING and which are not expired are returned at the moment

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

expires_atdate-time

Session expiry time

biometric_consent_requiredboolean

Determine whether the Biometric Consent Screen is enabled

Default: true

retry_enabledboolean

Ability for the user to retry verifying their age if an attempt fails

Default: false

resume_enabledboolean

This allows the user to resume a session (if the link is re-accessed).

Default: false

notification_urlstring

A https endpoint to call after a final result has been generated. This will be a post message containing the result and reference_id

pattern: ^https:.*

cancel_urlstring

URL where end users get redirected when they decide to cancel current AVS session

reference_idstring

Reference ID is an optional string. Yoti returns this same string in the session result. We recommend that you do not include any personal information in this string.

created_atdate-time

Session creation time

rule_idstring

This allows an age token rule ID to be specified. If a user has previously passed a session 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}$

blocked_locationsarray[string]

A list of locations that have been blocked for access

updated_atdate-time

Session update time

biometric_consent_given_atdate-time

The time when the biometric consent was given

target_origin_urlstring

A http url that specifies the i-frame parent in order to dispatch status update event

pattern: ^http[s]?:.*

synchronous_checksboolean

If set to true, ensures that all methods have a result ready before the user is redirected to the callback URL. Default is false, 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

404

Session not found

410

Session has expired for current check or invalid status

Response
Copy

Get the session result

Auth
Headers
Yoti-Sdk-Idstring

SDK ID obtained from the Yoti Hub

pattern: [a-zA-Z0-9\_\-]{14,40}

Path Params
sessionIdstring

The consumer's session id, created by the Yoti 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
idstring

Session ID created by Yoti server

sdk_idstring

SDK ID obtained from the Yoti Hub

callbackobject

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

autoboolean

Setting auto to true will automatically redirect users after verification.

typestring

Session type

Enum: AGE,OVER,UNDER

Default: OVER

statusstring

only sessions with a status of PENDING and which are not expired are returned at the moment

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

expires_atdate-time

Session expiry time

biometric_consent_requiredboolean

Determine whether the Biometric Consent Screen is enabled

Default: true

retry_enabledboolean

Ability for the user to retry verifying their age if an attempt fails

Default: false

resume_enabledboolean

This allows the user to resume a session (if the link is re-accessed).

Default: false

notification_urlstring

A https endpoint to call after a final result has been generated. This will be a post message containing the result and reference_id

pattern: ^https:.*

cancel_urlstring

URL where end users get redirected when they decide to cancel current AVS session

reference_idstring

Reference ID is an optional string. Yoti returns this same string in the session result. We recommend that you do not include any personal information in this string.

created_atdate-time

Session creation time

rule_idstring

This allows an age token rule ID to be specified. If a user has previously passed a session 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}$

blocked_locationsarray[string]

A list of locations that have been blocked for access

updated_atdate-time

Session update time

biometric_consent_given_atdate-time

The time when the biometric consent was given

target_origin_urlstring

A http url that specifies the i-frame parent in order to dispatch status update event

pattern: ^http[s]?:.*

synchronous_checksboolean

If set to true, ensures that all methods have a result ready before the user is redirected to the callback URL. Default is false, 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

401

Missing or unknown Yoti-Sdk-Id

404

Session not found

Response
Copy