When you need this
The SDKs are almost always enough: they open the ready-made verification page, which captures, checks quality and guides the user. Your own interface makes sense when your own application collects the photos and videos, for example on a kiosk or in a branch.
Capture is the hardest part
The ready-made verification page watches sharpness, glare and the position of the face during capture. In your own interface you have to do all of that yourself, or the number of resubmissions will grow.
Order of calls
Your server sends the files with the API key:
| Step | Method |
|---|---|
| 1. Create the verification | POST /v1/sessions |
| 2. Consent | POST /v1/sessions/{id}/consent |
| 3. Document, front and back | POST /v1/sessions/{id}/document |
| 4. Selfie | POST /v1/sessions/{id}/selfie |
| 5. Liveness | POST /v1/sessions/{id}/liveness/challenge, then …/liveness/frames |
| 6. Submit | POST /v1/sessions/{id}/submit |
Consent
You must obtain the user's consent to data processing before submitting.
curl https://api.veriffy.me/v1/sessions/{session_id}/consent \
-H "Authorization: Bearer $VERIFFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accepted": true, "locale": "en"}'Document
A multipart/form-data request, one per side:
curl https://api.veriffy.me/v1/sessions/{session_id}/document \
-H "Authorization: Bearer $VERIFFY_API_KEY" \
-F side=front \
-F document_type=id_card \
-F country=KZ \
-F file=@front.jpg| Field | Description |
|---|---|
side |
front or back |
document_type |
passport, id_card, residence_permit or driver_license |
country |
The issuing country, a two-letter code |
file |
The photo |
capture_method |
How the photo was obtained. camera by default |
The response says at once whether the photo is good enough: the accepted and issues fields. If the photo is not accepted, ask the user to retake it without waiting for the end of the verification.
Selfie
curl https://api.veriffy.me/v1/sessions/{session_id}/selfie \
-H "Authorization: Bearer $VERIFFY_API_KEY" \
-F file=@selfie.jpgLiveness
First ask for a challenge: POST …/liveness/challenge. The response says what the user has to do and how many frames to capture. Then send the frames: POST …/liveness/frames with the challenge_id and manifest fields and the frames files.
A few rules:
- a challenge can be used once and is valid for a limited time;
- frames are sent as they come from the camera, not mirrored;
- after showing a prompt give the person time to react — the delay is in the challenge response.
The exact fields of the challenge and the manifest are in the API reference.
Submit
The request starts the checks. A body is required — an empty object is enough:
curl https://api.veriffy.me/v1/sessions/{session_id}/submit \
-H "Authorization: Bearer $VERIFFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'If some steps are missing, you get the steps_incomplete error with the missing ones in details.missing.
The decision arrives as usual — as a verification.decided webhook.