Verification
People
Verify a person (KYC) with one identity verification, a liveness test then their document or ID number, and read the result.
Introduction#
Person verification (KYC) confirms who someone is. You create a person with what they told you, record their consent, then run an identity verification. It records the checks it made, and what it confirmed is stored as claims, kept apart from what the person declared.
Creating a person#
curl https://api.aqoon.si/v1/people \
-H "Authorization: Bearer $AQOONSI_KEY" \
-H "Accept: application/vnd.api+json" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"people","attributes":{
"givenName":"Amina","familyName":"Yusuf","dateOfBirth":"1990-04-05",
"nationality":"SO","reference":"customer-8841"
}}}'| Attribute | Meaning |
|---|---|
givenName, middleName, familyName |
The person's names, as they gave them |
dateOfBirth |
YYYY-MM-DD |
nationality |
ISO 3166-1 alpha-2 code, such as SO; it decides whether the person may give their ID number instead of photographing their document |
reference |
Your own ID for this person; filter by it with filter[reference] |
These are declared values. A verification never overwrites them; what it confirms becomes claims.
Consent#
Record consent before you verify a person, with the version of the notice they agreed to:
| Purpose | Required before |
|---|---|
identityVerification |
Any identity verification |
biometricProcessing |
Any face capture, and photographing an identity document |
sanctionsScreening |
Screening, where your notice covers it separately |
dataSharing |
Sharing the person's data, where your notice covers it |
Each consent says who recorded it in relationships.recorder: the team member who recorded it in the dashboard (users) or the API key that sent it (apiKeys). Aqoonsi takes this from the credential; you never send it. Add include=recorder to get their names. How the person agreed (on a screen, on paper) is part of your own records. Withdraw a consent with DELETE /v1/consents/{id}.
Verifying a person#
Send POST /v1/verifications with kind: identityDocument, a subject relationship and an Idempotency-Key. Your app names the person and nothing else: Aqoonsi learns the document's type and country by reading it, and decides whether a registry takes part.
{
"data": {
"type": "verifications",
"attributes": { "kind": "identityDocument" },
"relationships": {
"subject": {
"data": {
"type": "people",
"id": "0196d629-118b-7c3f-a049-dbb513d3ee95"
}
}
}
}
}The response is 201 with status: pending. The person then completes it on their phone or in their browser, with the SDK (see capture):
- A liveness test. A short guided selfie proves a live person is at the camera, not a photo, screen or mask. It comes first, and nothing else is accepted before it passes. A failed test ends the verification with
livenessFailed. - Their document, or their ID number. The person photographs a national ID card, a passport or a driving licence, and Aqoonsi reads it. Where a registry covers the person's nationality, the SDK also offers "Enter your ID number instead": the person chooses, not your app.
numbersays whether that choice isoffered, waschosen, or isunavailable. - The registry's code. Where a registry takes part (a national ID card of a country it covers, or the ID number path), the registry sends a one-time code to the phone number it holds, and the person enters it.
- The decision. Aqoonsi compares the face from the liveness test with the photo on the document and with the registry's photo where it has one, then decides. This takes a few seconds.
- A review, only when needed. Two things only a person can settle: a document or registry photo too poor to compare the face with, and an age estimate close to the minimum (see minimum age). Neither stops the person: they finish every step first. Then the verification is held for your team, as described in held for review.
Your account's owners choose which documents a person may verify with (National ID, passport, driving licence) in the dashboard's organization settings; all three are on by default. With National ID off there is no registry step and no ID number path. The minimum age is 16 for every account. In live, check GET /v1/capabilities/identityDocument for where it is available.
What a pass means#
A pass says the document and the person are consistent with each other and with what you supplied, and with the registry's record where one took part. It never says a document is authentic.
assurance |
Means |
|---|---|
registryVerified |
A registry took part: the person answered its code, its record matched, and the face matched its photo |
documentVerified |
No registry took part: the document read as valid, agrees with the details supplied and with the face |
A passport or a driving licence takes no registry step, so it ends at documentVerified at most.
Earlier verification kinds#
The kinds nationalIdentity, faceMatch and liveness were replaced by the identity verification: each of their checks now happens inside it. Verifications of those kinds made before stay readable and filterable by kind; new ones cannot be created (422).
Reading the result#
Fetch GET /v1/verifications/{id} after a webhook or the SDK's callback.
| Attribute | Values |
|---|---|
status |
pending, then awaitingCapture and awaitingCode while the person takes part, then verified, failed, expired or cancelled |
assurance |
registryVerified or documentVerified (see what a pass means) |
reason |
Why it failed: see why a verification failed |
number |
Whether the person may give their ID number instead of photographing their document: offered, chosen or unavailable |
review |
true while the verification is held for review: the person has finished, and someone on your team has to decide |
sanctions |
For a passed verification, the automatic screening of the verified name: clear, review or unavailable; skipped when it did not pass |
sanctions: review means a potential match is waiting for your team in a case. It never changes the verification's own result.
Held for review#
When the person has finished and the only thing left is a photo too poor to compare with or an age estimate close to the minimum, the verification is held: review is true, a case of kind verification is opened, and the verification does not expire while it waits. The decision on the case decides the verification:
| Case decision | The verification |
|---|---|
cleared |
Is decided like any other, and is verified when every other check passed |
declined |
Is failed with reason: reviewDeclined: your team's decision, not a statement from any source |
Escalating or reopening the case changes nothing, and a decision is final. The usual verification.completed or verification.failed event follows. The person's device is told only that someone is looking.
Why a verification failed#
reason |
Means |
|---|---|
livenessFailed |
No live person was proven at the camera |
faceMismatch |
The live face does not match the photo on the document or the registry's photo |
documentUnreadable |
The photos could not be read as a document, or the document looks copied or altered |
documentExpired |
The document has expired |
documentMismatch |
The document differs from what you supplied about the person (the attributeMatch check says which fields) |
documentNotAccepted |
Your account has switched this type of document off. Not a statement about the person |
identifierMissing |
The national ID card does not show the number its registry looks people up by. Not a statement about the person |
registryMismatch |
The document differs from the registry's record or photo |
identityNotFound |
The registry has no such person |
noContactInfo |
The registry holds no phone number to send the code to |
invalidIdNumber |
The registry refused the ID number as invalid |
tooManyAttempts |
The person entered a wrong code three times. A single wrong code only lets them try again |
underage |
The person is younger than the minimum age |
reviewDeclined |
Your team declined the verification after a review |
A source that was down is never a reason: see outages are not results.
Minimum age#
Nobody under 16 is accepted, in every account and every country. The date of birth decides: the registry's, else the one read from the document, else the one you supplied. Under 16 ends the verification at once with reason: underage, and nothing else runs for that person, screening included. A missing date of birth is not a failure.
Where the face service estimates an age from the liveness test, an estimate under 21 (the minimum plus 5 years) sends the verification to review at the end; the estimate alone never fails anyone. It is kept only in the minimumAge check's details and is removed when the person is erased.
The person's device is never told why: it sees notEligible (and the SDK's notEligible outcome), while underage and the check stay with you, so you decide what to tell the person.
Each step is a check: list them with GET /v1/verifications/{id}/checks to see why a verification passed or failed. A source that was down shows as a providerError check, and the verification stays open: see outages are not results.
Cancel an open verification with DELETE /v1/verifications/{id}. The record is kept.
Duplicate faces#
Aqoonsi can keep the face of each verified person and look for it again, to catch one person opening several identities in your account. Ask for it when your server creates the verification (POST /v1/verifications): enroll: true keeps the face once the verification passes, and duplicates: true searches for it. Every capture of that verification does what it asked, including the captures the SDK opens on the person's device, so nothing changes in your app.
- The search runs on the face that just passed the liveness test. The result is a
duplicateSearchcheck:matched, with the other enrolments and people indetails.duplicates, ornotMatched. The same person verifying again is not a duplicate. A match sendsverification.duplicateFoundand weighs on risk, but it never fails the verification: what to do about it is your decision. - The enrolment is made only after the verification is
verified, from its selfie, so only faces that passed are ever searched against. A failed, expired or cancelled verification enrols nothing. - Where it cannot be done, the verification is refused with
409 capture.enrollmentUnavailablewhen you create it, so no verification silently goes without it. A search that could not be made is an outage (503), never "no duplicate".
List enrolments with GET /v1/enrollments (filters subject and status, include=subject); no biometric data is ever returned. DELETE /v1/enrollments/{id} erases one (safe to retry; it is deleting until the face is gone). Enrolled faces are also erased with the person and after three years. Sandbox searches only sandbox faces, and deletes them within 24 hours.
Claims#
A claim is one confirmed fact, such as fullName or dateOfBirth, with its assurance and its source (nationalIdentityRegistry, documentReader or biometric). List a verification's claims with GET /v1/claims?filter[verification]={id}, or a person's with GET /v1/people/{id}/claims. A later verification supersedes older claims of the same kind; the history is kept.
Erasing a person#
DELETE /v1/people/{id} permanently erases a person: their personal values, document photos, registry photos and enrolled faces. It returns 202, and person.erased is sent when it completes. Cases and verification outcomes stay, without the personal data. Erasure cannot be undone, and nothing new can be recorded about the person afterwards.
Document photos, selfies, enrolled faces, registry photos, the records of registry lookups and business documents are all kept for three years, for every account, and then deleted.