Core concepts
Events, payloads and signatures
Register an HTTPS endpoint (see Register a webhook endpoint) and choose its events. Events fire for actions from FaceTrust desks and from the API alike.
Events#
| Event | When it fires |
|---|---|
| scan.completed | Every verify, from any channel. |
| enrollment.completed | A person finished enrolling their face. |
| signup.completedComing soon | Someone registered through a sign-up form (their face is already enrolled). |
| enrollment.link_expired | An enrollment link expired unused. |
| bulk_import.completed | A bulk import job finished. |
| exam.admitted | A student was admitted to an exam. |
| exam.referred | A student was referred to the exam officer. |
| referral.resolved | The exam officer resolved a referral. |
| attendance.recorded | A clock-in or clock-out. |
| checkin.recorded | A guest checked in. |
| checkin.duplicate | A repeat scan after check-in. |
Event payload#
Each delivery is a JSON event; match it to your records with its IDs. The outcome follows your account type.
{
"id": "evt_01JD96",
"type": "scan.completed",
"createdAt": "2026-11-19T09:12:40Z",
"institutionId": "inst_8f2a",
"registryId": "3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c",
"data": {
"result": "match",
"outcome": "admitted",
"referenceId": "scn_01JD8Y3K2Q",
"profileId": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57",
"confidence": 0.962,
"terminalId": "Hall A turnstile 2",
"channel": "api"
}
}{
"id": "evt_01JD96",
"type": "scan.completed",
"createdAt": "2026-11-19T09:12:40Z",
"institutionId": "inst_8f2a",
"registryId": "3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c",
"data": {
"result": "match",
"outcome": "clocked_in",
"referenceId": "scn_01JD8Y3K2Q",
"profileId": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57",
"confidence": 0.962,
"terminalId": "Hall A turnstile 2",
"channel": "api"
}
}{
"id": "evt_01JD96",
"type": "scan.completed",
"createdAt": "2026-11-19T09:12:40Z",
"institutionId": "inst_8f2a",
"registryId": "3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c",
"data": {
"result": "match",
"outcome": "checked_in",
"referenceId": "scn_01JD8Y3K2Q",
"profileId": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57",
"confidence": 0.962,
"terminalId": "Hall A turnstile 2",
"channel": "api"
}
}Verify every delivery#
Each delivery carries FaceTrust-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of t + "." + rawBody with your endpoint’s signing secret (shown once, when you register the endpoint). Reject signatures that don’t match and anything older than 5 minutes. Respond with any 2xx within 10 seconds; failed deliveries retry with exponential backoff for 24 hours. Use the event id to ignore duplicates.
import crypto from 'node:crypto'; // rawBody: the exact request body bytes, before any JSON parsing. export function verifyFaceTrustSignature(rawBody, header, secret) { const parts = Object.fromEntries(header.split(',').map((p) => p.split('='))); const age = Math.abs(Date.now() / 1000 - Number(parts.t)); if (!parts.t || !parts.v1 || age > 300) return false; // older than 5 minutes const expected = crypto.createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest(); const given = Buffer.from(parts.v1, 'hex'); // timingSafeEqual throws on different lengths: check first. return given.length === expected.length && crypto.timingSafeEqual(given, expected); }