Create a new KYC session
POST /kyc/session/create
Description
The method creates a new session for KYC (Know Your Customer) verification. Access requires a JWT token in the header.
Request format
- HTTP method:
POST - URL:
/kyc/session/create - Content type:
application/json - Authorization: required
Request parameters
| Parameter | Type | Where it is passed | Required | Description |
|---|---|---|---|---|
| token | string | Header | ✅ | User’s JWT token |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | ✅ | User’s JWT token |
| scenarioId | string | ✅ | Verification scenario ID |
| captcha | string | ❌ | Captcha (if required) |
Example request (cURL)
curl -X POST "https://api.enface.ai/kyc/session/create"
-H "Content-Type: application/json"
-H "Authorization: Bearer jwt.temporary.token"
-d '{
"token": "jwt.temporary.token",
"schemaId": "schema-001",
"captcha": "captcha-value"
}' Examples of answers
Success (200 OK)
{
"sessionId": "00000000-0000-0000-0000-000000000000",
"clientId": "null",
"status": "idle",
"spent": 0,
"results": [
{
"status": "idle",
"type": "document",
"spent": 0,
"errors": [],
"checks": []
}
],
"createdAt": "2025-05-21T08:14:20.959Z",
"isClientNew": true
} Error (400 Bad Request)
{
"message": "invalid schema",
"status": "error"
}