Create a new KYC session
POST /kyc/session/create
Description
This method creates a new session for KYC (user identity verification). A JWT token is required in the header.
Request Format
- HTTP method:
POST - URL:
/kyc/session/create - Content-Type:
application/json - Authorization: required
Request Parameters
| Parameter | Type | Where passed | Required | Description |
|---|---|---|---|---|
| token | string | Header | ✅ | User JWT token |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | ✅ | User JWT token |
| schemaId | string | ✅ | Verification schema identifier |
| captcha | string | ❌ | Captcha (if required) |
Request Example (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"
}' Response Examples
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"
}