VerifyHQ Docs

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/document

Submit 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

ParameterTypeDescription
userIdrequiredstringUser ID to associate this document with
documentTyperequiredenumID_CARD, PASSPORT, DRIVER_LICENSE, or RESIDENCE_PERMIT
documentCountryrequiredstringISO 3166-1 alpha-2 country code (e.g., NG, US, GB)
frontImagerequiredfileFront of the document (binary)
backImagefileBack 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/:id

Retrieve 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/:userId

List all document verifications for a user.

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems per page (default: 20, max: 100)

Supported Document Types

ParameterTypeDescription
ID_CARDtypeNational identity card (front + back required)
PASSPORTtypeInternational passport (front only, back optional)
DRIVER_LICENSEtypeDriver's license (front + back required)
RESIDENCE_PERMITtypeResidence 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.