Verification
Verify a face
POST
/registries/{registryId}/verifySend a live face image; get back who it is within your registry only. Same engine and response as the Merchant Portal. The mode comes from your account type: you don’t pass it. Outcomes: match, no_match, review (with candidates), duplicate_scan, or 422 liveness_failed.
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F image=@face.jpg \ -F terminalId="Hall A turnstile 2"
// Node.js 18+, ES module (built-in fetch and FormData) import { readFile } from 'node:fs/promises'; const form = new FormData(); form.append('image', new Blob([await readFile('face.jpg')]), 'face.jpg'); form.append('terminalId', 'Hall A turnstile 2'); const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), }, body: form, }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, files={"image": open("face.jpg", "rb")}, data={"terminalId": "Hall A turnstile 2"}, timeout=15, ) res.raise_for_status() data = res.json()
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F image=@face.jpg \ -F terminalId="Hall A turnstile 2"
// Node.js 18+, ES module (built-in fetch and FormData) import { readFile } from 'node:fs/promises'; const form = new FormData(); form.append('image', new Blob([await readFile('face.jpg')]), 'face.jpg'); form.append('terminalId', 'Hall A turnstile 2'); const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), }, body: form, }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, files={"image": open("face.jpg", "rb")}, data={"terminalId": "Hall A turnstile 2"}, timeout=15, ) res.raise_for_status() data = res.json()
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F image=@face.jpg \ -F terminalId="Hall A turnstile 2"
// Node.js 18+, ES module (built-in fetch and FormData) import { readFile } from 'node:fs/promises'; const form = new FormData(); form.append('image', new Blob([await readFile('face.jpg')]), 'face.jpg'); form.append('terminalId', 'Hall A turnstile 2'); const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), }, body: form, }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/verify", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, files={"image": open("face.jpg", "rb")}, data={"terminalId": "Hall A turnstile 2"}, timeout=15, ) res.raise_for_status() data = res.json()
200 · application/json
{
"result": "match",
"referenceId": "scn_01JD8Y3K2Q",
"confidence": 0.962,
"livenessScore": 0.991,
"profile": {
"id": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57",
"primaryKey": "CFU/24/1068",
"fullName": "Adaeze Okafor",
"phone": "+2348030000000",
"email": "adaeze@example.com",
"fields": {
"faculty": "Sciences",
"department": "Computer Science",
"level": "300",
"hostel_block": "Block B"
}
},
"recordedAt": "2026-11-19T09:12:40Z",
"mode": "exam_entry",
"exams": [
{
"examId": "b2f0c9d1-3a4e-4b5c-8d7e-6f1a2b3c4d5e",
"courseCode": "CSC 301",
"courseTitle": "Data Structures",
"startsAt": "2026-11-19T09:00:00Z",
"endsAt": "2026-11-19T11:00:00Z",
"venue": "CBT Hall A",
"eligible": true,
"eligibilityNote": null,
"admittedAt": null,
"preselected": true
},
{
"examId": "d4e5f6a7-0000-4b5c-8d7e-111111111111",
"courseCode": "MTH 201",
"courseTitle": "Linear Algebra",
"startsAt": "2026-11-19T13:00:00Z",
"endsAt": "2026-11-19T15:00:00Z",
"venue": "CBT Hall B",
"eligible": false,
"eligibilityNote": "Not on list",
"admittedAt": null,
"preselected": false
}
]
}200 · application/json
{
"result": "match",
"referenceId": "scn_01JD8Y3K2Q",
"confidence": 0.962,
"livenessScore": 0.991,
"profile": {
"id": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57",
"primaryKey": "NBL-00344",
"fullName": "Adaeze Okafor",
"phone": "+2348030000000",
"email": "adaeze@example.com",
"fields": {
"department": "Operations",
"job_title": "Fleet Supervisor",
"access_level": "Standard",
"manager_email": "ops.lead@example.com"
}
},
"recordedAt": "2026-11-19T09:12:40Z",
"mode": "attendance",
"attendance": {
"direction": "in",
"resultKey": "clocked_in",
"minutesLate": 0,
"location": {
"lat": 6.4281,
"lng": 3.4219
}
}
}200 · application/json
{
"result": "match",
"referenceId": "scn_01JD8Y3K2Q",
"confidence": 0.962,
"livenessScore": 0.991,
"profile": {
"id": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57",
"primaryKey": "TKT-88123",
"fullName": "Adaeze Okafor",
"phone": "+2348030000000",
"email": "adaeze@example.com",
"fields": {
"pass_type": "VIP",
"seat_number": "A12",
"event_date": "2026-11-19"
}
},
"recordedAt": "2026-11-19T09:12:40Z",
"mode": "event_checkin",
"checkIn": {
"resultKey": "checked_in",
"previousScanAt": null
}
}Use it for
The core scan for your own kiosks, turnstiles or exam software.
Headers#
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <key>, a key with the verify scope. See Authentication. |
Idempotency-Key | No | A UUID you generate. Retrying with the same key returns the original result. See Conventions. |
Content-Type | Yes | multipart/form-data |
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
registryId | uuid | Yes | Your registry. Shown on this page and in the console under Registry. |
Form fields (multipart)#
| Parameter | Type | Required | Description |
|---|---|---|---|
image | file | Yes | Live capture. JPEG/PNG, one face. |
terminalId | string | No | Your device label, e.g. "Hall A turnstile 2". Shown in logs. |
geo | "lat,lng" | No | Attendance only: where the scan happened. |
attestation | string | No | Optional device attestation token. |
Response#
Returns 200 with the body shown in the response example. Examples follow the account type selected at the top of the page. See Verification outcomes for every result and outcome key.
Shown above, with the request.
Errors#
| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | Missing, malformed, revoked or expired API key. |
forbidden_scope | 403 | The key doesn’t have the scope this endpoint needs. |
account_type_forbidden | 403 | This endpoint isn’t available to your account type. |
module_disabled | 403 | The module is switched off for your account. Contact FaceTrust. |
ip_not_allowed | 403 | The request came from an IP outside the key’s allowlist. |
rate_limited | 429 | Too many requests. Wait for Retry-After seconds. |
liveness_failed | 422 | The image failed the liveness check. Includes referenceId. |
no_face_detected | 422 | No face was found in the image. |
multiple_faces_detected | 422 | More than one face was found in the image. |
idempotency_conflict | 409 | This Idempotency-Key was used with a different request body. |