# Server-side enrolment

> Enrol people from your own app or kiosk when you collect the photo and consent yourself.

Source: https://docs.faceping.ai/server-enrollment/

This works with your sandbox key too, on your practice list (up to 25 people, each face deleted 24 hours after enrolment, nothing billed); a 26th person is refused with `409`. Enrolling the same `personId` again replaces the face and starts its 24 hours afresh. Use this when the person opts in inside **your** app (for example a native member app, a sign-in kiosk or a staffed front desk). If you can, prefer [the widget](https://docs.faceping.ai/widget/): it handles consent wording, the camera and photo quality for you, and keeps photos off your servers.

## The request

[POST /v1/lists/{listId}/people](https://docs.faceping.ai/reference/#tag/people/POST/v1/lists/{listId}/people)

```json
{
  "personId": "ACME-000123",
  "imageBase64": "<JPEG, base64>",
  "consent": {
    "consentVersion": "uk-v1",
    "givenAt": "2026-11-01T14:03:00Z",
    "explicitBiometricConsent": true,
    "writtenRelease": false,
    "under16": false,
    "guardianConsent": false
  }
}
```

`personId` is your ID for the person: a ticket number or membership number (up to 200 characters). `consent.givenAt` (when they agreed) is required; `writtenRelease`, `under16` and `guardianConsent` are optional and default to `false`. To try it from a terminal, the [quickstart](https://docs.faceping.ai/quickstart/#enrol-someone-from-your-server) builds this request from a selfie with `jq`.

Enrolment takes a few seconds, as the photo is turned into a face template: set your HTTP client's timeout to 30 seconds or more.

FacePing checks the consent **before it even decodes the photo**: without explicit consent (plus the written release on a US list, and a guardian's consent for under-16s), it refuses with `400` and never processes the image. [What each consent field records](https://docs.faceping.ai/compliance/#consent-fields) maps every field to the box the person ticks.

## Consent

Record exactly what the person agreed to. The wording follows the list's country. `GET /v1/lists/{listId}/consent` returns it filled in for the list (your organisation name, the list's name and when the face is deleted), with its `consentVersion` and your privacy notice link: show that wording, then send the same version as `consent.consentVersion`:

| List country | Version | Wording |
| --- | --- | --- |
| United States (`US`) | `us-v1` | Written biometric release ([wording](https://docs.faceping.ai/compliance/#consent-wording)) |
| EU and EEA countries | `eu-v1` | [Consent wording](https://docs.faceping.ai/compliance/#consent-wording) |
| Anywhere else, the UK included | `uk-v1` | [Consent wording](https://docs.faceping.ai/compliance/#consent-wording) |

A list with no country follows your account's country, then your billing currency. See [Which wording people see](https://docs.faceping.ai/compliance/#which-wording).

Only the list's current version is accepted, so if FacePing publishes new wording, show it and send the new version. People must tick the boxes themselves: never pre-tick them, and never make face check-in a condition of buying a ticket, joining or anything else.

## The photo

- One face, looking at the camera, in good light; nothing covering it.
- JPEG, longest side up to about 1280 px. Larger photos work but upload slowly, and FacePing works at 1280 px anyway. (With the .NET SDK, [`EnrollmentPhoto.Prepare`](https://docs.faceping.ai/sdk/maui/#enrollmentphoto) does this for you, in [.NET MAUI](https://docs.faceping.ai/sdk/maui/#enrollmentphoto) and [Avalonia](https://docs.faceping.ai/sdk/avalonia/#enrollmentphoto) apps alike.)
- The whole request can be up to 15 MB (about 11 MB of photo once it's base64 encoded).

| Response | Meaning |
| --- | --- |
| `201` | Enrolled, with a `Location` header (`/v1/lists/{listId}/people/{personId}`) and `personId`, `modelId` (the face model that made the template, for example `sface-2021dec-int8`; you don't need to do anything with it) and `deleteAfter` (when this person's face is deleted) in the body. Enrolling the same `personId` again replaces the face, also with `201` (still one person on your bill); the old template is deleted and logged as `Replaced` in your deletion log. |
| `400` | `personId` missing or over 200 characters, consent missing or invalid (`givenAt` missing, for example), or the image isn't valid base64, JPEG or PNG. |
| `402` | Your plan doesn't allow more people (the pilot's 500, or no plan). |
| `404` | No such list (or not yours): "No check-in list with that id on your account." |
| `409` | Enrolment is closed for this list, the list has ended, the list is full (a practice list holds 25 people), or `consent.consentVersion` isn't the list's `consentVersion` (show people the list's wording and send that version). |
| `413` | The request is over 15 MB: send a smaller JPEG or PNG (FacePing scales it to 1280 px anyway). |
| `422` | No usable face: none found, more than one, or too small. Ask for a new photo. |

The photo is used once and never stored or logged.

## Close enrolment

When a list is final (the doors have opened, say, or sign-up has closed), close enrolment. No one else can enrol, from your server, the widget or the dashboard, and no new enrolment links can be created. Check-in devices get the final list at their next sync. People already enrolled stay until their faces are deleted as usual. Enrolment can't be reopened, and the list's `enrollmentClosed` is then `true`.

```bash
curl -X POST https://api-eu.faceping.ai/v1/lists/$LIST_ID/close-enrollment -H "X-Api-Key: $FACEPING_API_KEY"
```

[POST /v1/lists/{listId}/close-enrollment](https://docs.faceping.ai/reference/#tag/people/POST/v1/lists/{listId}/close-enrollment)
