Docs › API reference › Identity verification
Create document session
Generates a document enrolment token that identifies your user. The response contains an accessToken and a sessionId, which you use to enrol the document.
POST
https://api.screenlyyid.com/api/v1/enrolment/initializeHeaders#
| Name | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your ScreenlyyID API key |
x-correlation-id | string (uuid) | Yes | Correlation ID for this customer check |
Responses#
| Status | Description |
|---|---|
200 | Successful response |
Response body (200)#
| Field | Type | Required | Description |
|---|---|---|---|
AccessToken | string | No | |
SessionId | string | No |
Code samples#
curl --request POST \
--url 'https://api.screenlyyid.com/api/v1/enrolment/initialize' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-correlation-id: YOUR_CORRELATION_ID'const response = await fetch(
"https://api.screenlyyid.com/api/v1/enrolment/initialize",
{
"method": "POST",
"headers": {
"x-api-key": "YOUR_API_KEY",
"x-correlation-id": "YOUR_CORRELATION_ID"
}
}
);
const result = await response.json();import requests
response = requests.post(
'https://api.screenlyyid.com/api/v1/enrolment/initialize',
headers={
"x-api-key": "YOUR_API_KEY",
"x-correlation-id": "YOUR_CORRELATION_ID"
}
)
result = response.json()using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
client.DefaultRequestHeaders.Add("x-correlation-id", "YOUR_CORRELATION_ID");
var response = await client.PostAsync("https://api.screenlyyid.com/api/v1/enrolment/initialize", null);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();