Document Verification
Upload identity documents for automated verification. Supports ID cards, passports, driver's licenses, and residence permits. Images are analyzed using OCR and fraud detection algorithms.
POST
/verifications/documentSubmit a document for verification. Upload front (required) and back (optional) images via multipart form data.
Max file size: 10MB per image. Accepted formats: JPEG, PNG, WebP, HEIC.
Form Fields
| Parameter | Type | Description |
|---|---|---|
userIdrequired | string | User ID to associate this document with |
documentTyperequired | enum | ID_CARD, PASSPORT, DRIVER_LICENSE, or RESIDENCE_PERMIT |
documentCountryrequired | string | ISO 3166-1 alpha-2 country code (e.g., NG, US, GB) |
frontImagerequired | file | Front of the document (binary) |
backImage | file | Back of the document (optional for passports) |
Code Examples
curl -X POST https://api.verifyhq.com/v1/verifications/document \
-H "X-API-Key: your_api_key" \
-F "userId=user_123" \
-F "documentType=ID_CARD" \
-F "documentCountry=NG" \
-F "frontImage=@id_front.jpg" \
-F "backImage=@id_back.jpg"Response
201 Createdjson
{
"id": "doc_xyz789",
"userId": "user_123",
"documentType": "ID_CARD",
"documentCountry": "NG",
"status": "PROCESSING",
"createdAt": "2025-01-15T10:31:00Z"
}GET
/verifications/document/:idRetrieve a document verification by ID.
200 OK — Verifiedjson
{
"id": "doc_xyz789",
"userId": "user_123",
"documentType": "ID_CARD",
"documentCountry": "NG",
"status": "VERIFIED",
"extractedFields": {
"fullName": "Adebayo Ogunlesi",
"dateOfBirth": "1990-05-15",
"documentNumber": "A12345678",
"expiryDate": "2030-12-31",
"nationality": "Nigerian"
},
"fraudIndicators": [],
"confidence": 0.97,
"completedAt": "2025-01-15T10:31:45Z"
}GET
/verifications/document/user/:userIdList all document verifications for a user.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
Supported Document Types
| Parameter | Type | Description |
|---|---|---|
ID_CARD | type | National identity card (front + back required) |
PASSPORT | type | International passport (front only, back optional) |
DRIVER_LICENSE | type | Driver's license (front + back required) |
RESIDENCE_PERMIT | type | Residence permit / work permit (front + back required) |
Supported Countries
VerifyHQ supports documents from 50+ countries with primary focus on African markets: Nigeria (NG), Kenya (KE), Ghana (GH), South Africa (ZA), Egypt (EG), Tanzania (TZ), Uganda (UG), Rwanda (RW), and more. Global documents (US, GB, EU) are also supported.