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.wejoona.com/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",
  "frontImageUrl": "/uploads/id_front.jpg",
  "backImageUrl": "/uploads/id_back.jpg",
  "status": "PENDING",
  "createdAt": "2026-05-25T10:31:00Z",
  "updatedAt": "2026-05-25T10: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",
  "frontImageUrl": "/uploads/id_front.jpg",
  "backImageUrl": "/uploads/id_back.jpg",
  "status": "VERIFIED",
  "extractedData": {
    "fullName": "Adebayo Ogunlesi",
    "dateOfBirth": "1990-05-15",
    "documentNumber": "A12345678",
    "expiryDate": "2030-12-31",
    "nationality": "Nigerian"
  },
  "confidence": 0.97,
  "verifiedAt": "2026-05-25T10:31:45Z",
  "createdAt": "2026-05-25T10:31:00Z",
  "updatedAt": "2026-05-25T10: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)
200 OKjson
{
  "data": [
    {
      "id": "doc_xyz789",
      "userId": "user_123",
      "documentType": "ID_CARD",
      "documentCountry": "NG",
      "frontImageUrl": "/uploads/id_front.jpg",
      "status": "PENDING",
      "createdAt": "2026-05-25T10:31:00Z",
      "updatedAt": "2026-05-25T10:31:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 20
}

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)

Document Country

Provide the issuing country with the documentCountry field using an ISO 3166-1 alpha-2 code. Supported-country coverage should be treated as a provider configuration concern until the API publishes a generated country list.