Verify Identity
Server-to-Server
Verify Identity
Run document scan, face detect, and face compare in a single call
POST
Verify Identity
/v1/document/scan, /v1/face/detect on the selfie, and /v1/face/compare between the document photo and the selfie — in parallel — and returns a single aggregated response with an overallConfidence score.
Use this when you have both images already and want one round-trip instead of orchestrating three calls yourself. If you only have one of the two images, call the individual endpoints directly.
Request
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Content-Type | Yes | multipart/form-data or application/json |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
documentImage | binary | string | Yes | Image of the document. Multipart file part or JSON base64/base64url/S3-key string. |
faceImage | binary | string | Yes | Selfie image. Same input rules as documentImage. |
documentType | string | No | One of passport, drivers_license, national_id, auto. Defaults to auto. |
documentImage as a JSON S3 key (from an earlier presigned upload) and faceImage as fresh multipart bytes. See the overview for the shared image rules.
Example request
Response
200 — Success
All confidence and threshold values on this response are reported on a 0–100 scale.| Field | Type | Description |
|---|---|---|
verified | boolean | Overall pass/fail derived from the three sub-results |
document | object | Subset of /v1/document/scan response |
faceDetection | object | Result of /v1/face/detect on the selfie |
faceMatch | object | Comparison between document photo and selfie |
overallConfidence | number (0–100) | Weighted aggregate confidence across all three sub-results |
document
| Field | Type | Description |
|---|---|---|
documentType | string | Normalized document type |
fullName | string | Full name as printed on the document |
firstName | string | First name |
lastName | string | Last name |
dateOfBirth | string | Date of birth |
gender | string | Gender |
nationality | string | Nationality |
documentNumber | string | Document number |
expirationDate | string | Document expiration date |
issuingCountry | string | Issuing country |
address | string | Address (when present) |
confidence | number (0–100) | Average document-extraction confidence |
faceDetection
| Field | Type | Description |
|---|---|---|
faceDetected | boolean | True when a face was detected in the selfie |
confidence | number (0–100) | Detection confidence for the top face |
faceMatch
| Field | Type | Description |
|---|---|---|
isMatch | boolean | True when confidence >= threshold |
confidence | number (0–100) | Best face-match similarity |
threshold | number (0–100) | Match threshold |
Error responses
| Status | Description |
|---|---|
400 | Invalid body, unsupported image format, or image larger than 15 MB |
401 | Missing or invalid x-api-key |
402 | Insufficient token balance |
403 | A supplied S3 key is not readable by this organization |
429 | Rate limit exceeded |
500 | Unexpected server error — safe to retry with backoff |
How overallConfidence is calculated
overallConfidence is a fixed weighted blend of the three sub-results:
| Component | Weight |
|---|---|
| Document extraction confidence | 0.4 |
| Face-detection confidence (selfie) | 0.2 |
| Face-match confidence (document photo vs selfie) | 0.4 |
overallConfidence.
Partial failures
The three sub-calls run in parallel and are independent. If one fails (for example, no face detected in the selfie), the others still run and the corresponding block reports the failure in-band rather than 4xx-ing the whole request. Always inspect each block before acting onoverallConfidence.