Verify a document, and optionally a selfie, synchronously
curl --request POST \
--url https://api.verifner.com/v1/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form front='@example-file' \
--form back='@example-file' \
--form selfie='@example-file'const form = new FormData();
form.append('front', '<string>');
form.append('back', '<string>');
form.append('selfie', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.verifner.com/v1/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.verifner.com/v1/verify"
files = {
"front": ("example-file", open("example-file", "rb")),
"back": ("example-file", open("example-file", "rb")),
"selfie": ("example-file", open("example-file", "rb"))
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verifner.com/v1/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"selfie\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"verdict": "verified",
"score": 0.5,
"document_type": "passport",
"checks": [
{
"name": "mrz_checksum",
"status": "pass",
"score": 0.5,
"evidence": {
"fr": "<string>",
"en": "<string>"
}
}
],
"latency_ms": 4503599627370495,
"created_at": "2023-11-07T05:31:56Z",
"status": "VERIFIED",
"document": {
"type": "passport",
"country": "<string>",
"fields": {},
"mrz": {
"lines": [
"<string>"
],
"valid": true
},
"legibility": 123
},
"fields": {},
"face_match": {
"similarity": 123,
"matched": true,
"faces_in_document": 123,
"faces_in_selfie": 123
},
"timings": {}
}{
"id": "<string>",
"verdict": "verified",
"score": 0.5,
"document_type": "passport",
"checks": [
{
"name": "mrz_checksum",
"status": "pass",
"score": 0.5,
"evidence": {
"fr": "<string>",
"en": "<string>"
}
}
],
"latency_ms": 4503599627370495,
"created_at": "2023-11-07T05:31:56Z",
"status": "VERIFIED",
"document": {
"type": "passport",
"country": "<string>",
"fields": {},
"mrz": {
"lines": [
"<string>"
],
"valid": true
},
"legibility": 123
},
"fields": {},
"face_match": {
"similarity": 123,
"matched": true,
"faces_in_document": 123,
"faces_in_selfie": 123
},
"timings": {}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Verify
Verify a document, and optionally a selfie, synchronously
Send an Idempotency-Key header to make retries safe: the same key returns the original result with Idempotent-Replayed: true. Test keys (vn_test_) run the full pipeline and never store images.
POST
/
v1
/
verify
Verify a document, and optionally a selfie, synchronously
curl --request POST \
--url https://api.verifner.com/v1/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form front='@example-file' \
--form back='@example-file' \
--form selfie='@example-file'const form = new FormData();
form.append('front', '<string>');
form.append('back', '<string>');
form.append('selfie', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.verifner.com/v1/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.verifner.com/v1/verify"
files = {
"front": ("example-file", open("example-file", "rb")),
"back": ("example-file", open("example-file", "rb")),
"selfie": ("example-file", open("example-file", "rb"))
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verifner.com/v1/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"front\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"back\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"selfie\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"verdict": "verified",
"score": 0.5,
"document_type": "passport",
"checks": [
{
"name": "mrz_checksum",
"status": "pass",
"score": 0.5,
"evidence": {
"fr": "<string>",
"en": "<string>"
}
}
],
"latency_ms": 4503599627370495,
"created_at": "2023-11-07T05:31:56Z",
"status": "VERIFIED",
"document": {
"type": "passport",
"country": "<string>",
"fields": {},
"mrz": {
"lines": [
"<string>"
],
"valid": true
},
"legibility": 123
},
"fields": {},
"face_match": {
"similarity": 123,
"matched": true,
"faces_in_document": 123,
"faces_in_selfie": 123
},
"timings": {}
}{
"id": "<string>",
"verdict": "verified",
"score": 0.5,
"document_type": "passport",
"checks": [
{
"name": "mrz_checksum",
"status": "pass",
"score": 0.5,
"evidence": {
"fr": "<string>",
"en": "<string>"
}
}
],
"latency_ms": 4503599627370495,
"created_at": "2023-11-07T05:31:56Z",
"status": "VERIFIED",
"document": {
"type": "passport",
"country": "<string>",
"fields": {},
"mrz": {
"lines": [
"<string>"
],
"valid": true
},
"legibility": 123
},
"fields": {},
"face_match": {
"similarity": 123,
"matched": true,
"faces_in_document": 123,
"faces_in_selfie": 123
},
"timings": {}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Autorisations
vn_live_… or vn_test_…, from the console.
En-têtes
Maximum string length:
255Corps
multipart/form-dataapplication/json
Réponse
Replayed from the idempotency key
Five checks, each with bilingual evidence. final_verdict appears on reads once a reviewer decided.
Pattern:
^vrf_[a-z0-9]{6,}$Options disponibles:
verified, review, rejected Plage requise:
0 <= x <= 1Options disponibles:
passport, cni, unknown Show child attributes
Show child attributes
Plage requise:
0 <= x <= 9007199254740991Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Options disponibles:
VERIFIED, REVIEW, REJECTED Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes