Exams
Admit or refer a student
POST
/registries/{registryId}/exam-admissionsThe call your hall-entry system makes. Ineligible → 409 not_eligible; after the late-entry window → 409 exam_ended. Late entry is allowed and recorded as minutesLate. Retrying with the same Idempotency-Key never admits twice.
curl -X POST "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/exam-admissions" \ -H "Authorization: Bearer $FACETRUST_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "profileId": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57", "examId": "b2f0c9d1-3a4e-4b5c-8d7e-6f1a2b3c4d5e", "referenceId": "scn_01JD8Y3K2Q", "method": "face", "action": "admit" }'
// 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/exam-admissions', { method: 'POST', headers: { Authorization: `Bearer ${process.env.FACETRUST_API_KEY}`, 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ "profileId": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57", "examId": "b2f0c9d1-3a4e-4b5c-8d7e-6f1a2b3c4d5e", "referenceId": "scn_01JD8Y3K2Q", "method": "face", "action": "admit" }), }); const data = await res.json();
import os, uuid, requests res = requests.post( "https://api.facetrustai.com/v1/registries/3f9a1c2e-7b4d-4e6a-9c8b-2d1e0f5a6b7c/exam-admissions", headers={"Authorization": f"Bearer {os.environ['FACETRUST_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, json={ "profileId": "7c1e2a4b-5d3f-4e8a-9b21-0f6d8c3e1a57", "examId": "b2f0c9d1-3a4e-4b5c-8d7e-6f1a2b3c4d5e", "referenceId": "scn_01JD8Y3K2Q", "method": "face", "action": "admit" }, timeout=15, ) res.raise_for_status() data = res.json()
200 · application/json
{
"result": "admitted",
"admissionId": "adm_01JD90",
"admittedAt": "2026-11-19T09:12:40Z",
"minutesLate": 12
}Use it for
Schools admitting students from their own exam software.
School accounts only
This endpoint is available to School accounts. Calls from other account types return
403 account_type_forbidden.Headers#
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <key>, a key with the admissions:write scope. See Authentication. |
Idempotency-Key | No | A UUID you generate. Retrying with the same key returns the original result. See Conventions. |
Content-Type | Yes | application/json |
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
registryId | uuid | Yes | Your registry. Shown on this page and in the console under Registry. |
Body parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
profileId | uuid | Yes | None |
examId | uuid | Yes | None |
referenceId | string | No | The verify call’s referenceId, linking the face scan. |
method | "face" | "manual" | Yes | None |
action | "admit" | "refer" | Yes | None |
Response#
Returns 200 with the body shown in the response example. Examples follow the account type selected at the top of the page.
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. |
not_found | 404 | No such resource in your institution. |
not_eligible | 409 | The student isn’t on this exam’s eligibility list. |
exam_ended | 409 | The exam (or its late-entry window) has ended. |
idempotency_conflict | 409 | This Idempotency-Key was used with a different request body. |