Get started
Quickstart: your first verification in four calls
Create a test key in the Institution Console (API → Keys; test keys start with ftk_test_) and keep it on your server. Then:
1. Check your key#
GET/accountConfirms the key works and shows your account type, modules and limits.
curl -X GET "https://api.facetrustai.com/v1/account" \ -H "Authorization: Bearer $FACETRUST_API_KEY"
// Node.js 18+, ES module (built-in fetch and FormData) const res = await fetch('https://api.facetrustai.com/v1/account', { method: 'GET', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, }, }); const data = await res.json();
import os, uuid, requests res = requests.get( "https://api.facetrustai.com/v1/account", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}"}, timeout=15, ) res.raise_for_status() data = res.json()
curl -X GET "https://api.facetrustai.com/v1/account" \ -H "Authorization: Bearer $FACETRUST_API_KEY"
// Node.js 18+, ES module (built-in fetch and FormData) const res = await fetch('https://api.facetrustai.com/v1/account', { method: 'GET', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, }, }); const data = await res.json();
import os, uuid, requests res = requests.get( "https://api.facetrustai.com/v1/account", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}"}, timeout=15, ) res.raise_for_status() data = res.json()
curl -X GET "https://api.facetrustai.com/v1/account" \ -H "Authorization: Bearer $FACETRUST_API_KEY"
// Node.js 18+, ES module (built-in fetch and FormData) const res = await fetch('https://api.facetrustai.com/v1/account', { method: 'GET', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, }, }); const data = await res.json();
import os, uuid, requests res = requests.get( "https://api.facetrustai.com/v1/account", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}"}, timeout=15, ) res.raise_for_status() data = res.json()
2. Add a person#
POST/registries/{registryId}/profilesCreate someone in your registry. Get your registry ID from GET /registries.
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "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" }, "courses": [ "CSC 301", "MTH 201", "GST 111" ] }'
// Node.js 18+, ES module (built-in fetch and FormData) const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ "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" }, "courses": [ "CSC 301", "MTH 201", "GST 111" ] }), }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, json={ "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" }, "courses": [ "CSC 301", "MTH 201", "GST 111" ] }, timeout=15, ) res.raise_for_status() data = res.json()
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "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" } }'
// Node.js 18+, ES module (built-in fetch and FormData) const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ "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" } }), }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, json={ "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" } }, timeout=15, ) res.raise_for_status() data = res.json()
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "primaryKey": "TKT-88123", "fullName": "Adaeze Okafor", "phone": "+2348030000000", "email": "adaeze@example.com", "fields": { "pass_type": "VIP", "seat_number": "A12", "event_date": "2026-11-19" } }'
// Node.js 18+, ES module (built-in fetch and FormData) const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ "primaryKey": "TKT-88123", "fullName": "Adaeze Okafor", "phone": "+2348030000000", "email": "adaeze@example.com", "fields": { "pass_type": "VIP", "seat_number": "A12", "event_date": "2026-11-19" } }), }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, json={ "primaryKey": "TKT-88123", "fullName": "Adaeze Okafor", "phone": "+2348030000000", "email": "adaeze@example.com", "fields": { "pass_type": "VIP", "seat_number": "A12", "event_date": "2026-11-19" } }, timeout=15, ) res.raise_for_status() data = res.json()
3. Enroll their face#
POST/registries/{registryId}/profiles/{profileId}/faceUpload a live capture. Or skip this and let them scan their own face through an enrollment link or a sign-up form.
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F image=@face.jpg
// 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'); const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face', { 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/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, files={"image": open("face.jpg", "rb")}, timeout=15, ) res.raise_for_status() data = res.json()
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F image=@face.jpg
// 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'); const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face', { 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/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, files={"image": open("face.jpg", "rb")}, timeout=15, ) res.raise_for_status() data = res.json()
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F image=@face.jpg
// 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'); const res = await fetch('https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face', { 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/profiles/7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57/face", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, files={"image": open("face.jpg", "rb")}, timeout=15, ) res.raise_for_status() data = res.json()
4. Verify a live scan#
POST/registries/{registryId}/verifySend a new capture; get back who it is and what happened in your mode.
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()