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

POST /api/v1/sessions
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 retrival

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

404

Session not found

410

Session has expired for current check or invalid status

Response
Copy

Delete the sessionID.

Auth
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}$

DELETE /api/v1/sessions/{sessionId}
Copy
Responses
204

Delete session, no content returned

No response body
401

Missing or unknown Yoti-Sdk-Id

403

Not allowed to use this session

404

Session not found

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

401

Missing or unknown Yoti-Sdk-Id

404

Session not found

Response
Copy