faceping.aifaceping.aidocs

Quickstart

From API key to an enrolled guest in five calls.

You'll need an approved FacePing account (apply here) and an API key from Dashboard → API keys. Set it in your shell:

export FACEPING_API_KEY="fp_…"
export FACEPING="https://api-eu.faceping.ai"

1. Create an event#

curl -X POST $FACEPING/v1/events \
  -H "X-Api-Key: $FACEPING_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "name": "Autumn Live",
    "startsAt": "2026-11-20T18:00:00Z",
    "endsAt":   "2026-11-20T23:00:00Z",
    "nonFaceEntryAvailable": true,
    "retentionDays": 7
  }'

Save the returned id. nonFaceEntryAvailable must be true: guests always need a way in without face check-in. matchMode defaults to Verify (the gate checks the face against the scanned ticket only).

POST /v1/events →

2. Set up the widget#

Tell guests who you are and link your face check-in privacy notice (template):

curl -X POST $FACEPING/v1/events/$EVENT_ID/widget \
  -H "X-Api-Key: $FACEPING_API_KEY" -H "Content-Type: application/json" \
  -d '{ "organiserName": "Acme Live", "privacyUrl": "https://acme.example/face-privacy", "brandColor": "#0066ff" }'

POST /v1/events/{eventId}/widget →

3. Create an enrolment token for a buyer#

When someone buys a ticket, your server creates a single-use token for that ticket:

curl -X POST $FACEPING/v1/events/$EVENT_ID/enrolment-tokens \
  -H "X-Api-Key: $FACEPING_API_KEY" -H "Content-Type: application/json" \
  -d '{ "ticketId": "ACME-000123" }'
# → { "token": "fpe_…", "expiresAt": "…", "url": "https://faceping.ai/enrol#t=fpe_…" }

POST /v1/events/{eventId}/enrolment-tokens →

4. Show the widget#

On your confirmation page:

<div data-faceping-token="fpe_…"></div>
<script src="https://faceping.ai/widget.js" async></script>

The guest ticks the consent boxes, takes a selfie and they're enrolled. No photo touches your servers. Or simply open the token's url in a browser to try it yourself.

5. Check who's enrolled#

curl $FACEPING/v1/events/$EVENT_ID/enrolments -H "X-Api-Key: $FACEPING_API_KEY"

GET /v1/events/{eventId}/enrolments →

That's it. Next, embed the widget properly and set up your gates. Framework-specific code is in Examples.