ID Verification API
curl --request POST \
--url https://identity.contra.id/v1/id-verificationimport requests
url = "https://identity.contra.id/v1/id-verification"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://identity.contra.id/v1/id-verification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://identity.contra.id/v1/id-verification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://identity.contra.id/v1/id-verification"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://identity.contra.id/v1/id-verification")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity.contra.id/v1/id-verification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyIdentity & Documents
ID Verification API
Standalone document verification — OCR, MRZ, NFC. Use when you only need a single document check (no full workflow).
POST
/
v1
/
id-verification
ID Verification API
curl --request POST \
--url https://identity.contra.id/v1/id-verificationimport requests
url = "https://identity.contra.id/v1/id-verification"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://identity.contra.id/v1/id-verification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://identity.contra.id/v1/id-verification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://identity.contra.id/v1/id-verification"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://identity.contra.id/v1/id-verification")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity.contra.id/v1/id-verification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRequest
curl -X POST https://identity.contra.id/v1/id-verification \
-H "x-api-key: $CONTRA_KEY" -H "Content-Type: application/json" \
-d '{
"country": "GB",
"id_type": "PASSPORT",
"image_front": "data:image/jpeg;base64,/9j/4AAQ…",
"image_back": null,
"metadata": { "vendor_user_id": "user-123" }
}'
| Body | Type | Required | Description |
|---|---|---|---|
country | ISO-2 | yes | Issuing country code. |
id_type | enum | yes | PASSPORT · DRIVERS_LICENSE · NATIONAL_ID · RESIDENCE_PERMIT · … |
image_front | string | yes | Base64-encoded JPEG of the front. |
image_back | string | conditional | Required for 2-sided documents. |
enable_nfc | boolean | no | Read NFC chip if available (mobile ePassports). |
metadata | object | no | Echoed back on the response. |
Response · 200
{
"verification_id": "ver_b3f1c2a4",
"status": "passed",
"result_code": "0811",
"checks": {
"document_authentic": "passed",
"mrz_match": "passed",
"expiry_check": "passed",
"nfc_signature": "skipped"
},
"issuing_country": "GB",
"document_type": "PASSPORT"
}
Coverage
4,000+ document types · 226 countries. Combine with Face Match for selfie-to-document verification.⌘I