API Reference

Identity Verification

Document verification, biometric liveness detection, and identity proofing endpoints.

Document Verification

POST
/v1/identity/verify

Submit a document for identity verification

Request Body

ParameterTypeRequiredDescription
documentTypestringYespassport, national_id, drivers_license
documentFrontstringYesBase64-encoded front image of the document
documentBackstringNoBase64-encoded back image (required for some IDs)
selfiestringYesBase64-encoded selfie for face matching
countrystringYesISO 3166-1 alpha-2 country code
JavaScript
const response = await fetch('https://api.mobid.io/v1/identity/verify', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Mobid-Key': process.env.MID_API_KEY
  },
  body: JSON.stringify({
    documentType: 'passport',
    documentFront: frontImageBase64,
    selfie: selfieBase64,
    country: 'US'
  })
});

const { data } = await response.json();
console.log('Verification ID:', data.verificationId);
Response
{
  "code": 200,
  "message": "Verification initiated",
  "data": {
    "verificationId": "ver_abc123",
    "status": "processing",
    "estimatedTime": "30s",
    "createdAt": "2025-01-15T12:00:00Z"
  }
}

Verification Status

GET
/v1/identity/verify/:verificationId

Check the status of a verification request

Response
{
  "code": 200,
  "data": {
    "verificationId": "ver_abc123",
    "status": "verified",
    "confidence": 0.98,
    "checks": {
      "documentAuthenticity": "passed",
      "faceMatch": "passed",
      "livenessDetection": "passed",
      "dataExtraction": "completed"
    },
    "extractedData": {
      "firstName": "John",
      "lastName": "Doe",
      "dateOfBirth": "1990-01-15",
      "documentNumber": "AB1234567",
      "expiryDate": "2030-06-20",
      "nationality": "US"
    }
  }
}

Liveness Detection

POST
/v1/identity/biometrics/liveness

Perform a liveness detection check

Request Body

ParameterTypeRequiredDescription
imagestringYesBase64-encoded image or video frame
challengestringNoSpecific challenge type: blink, smile, turn_head
Response
{
  "code": 200,
  "data": {
    "isLive": true,
    "confidence": 0.99,
    "spoofType": null,
    "processingTime": "120ms"
  }
}

Anti-Spoofing

Liveness detection uses AI to detect presentation attacks including printed photos, screen replays, and 3D masks. Confidence scores above 0.95 are considered reliable.