API Documentation

Complete reference for integrating KlarifyID identity verification into your application

Authentication

Bearer token auth

REST API

JSON responses

Secure

HTTPS only

Easy Integration

5 minutes setup

Getting Started

Base URL

https://api.klarifyid.online/v1

Authentication

All API requests require authentication using a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Document Verification

POST/verify/document

Verify and extract data from identity documents including passports, driver licenses, and national IDs.

Request

curl -X POST https://api.klarifyid.online/v1/verify/document \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_image": "base64_encoded_image",
    "document_type": "passport",
    "country": "US"
  }'

Response

{
  "success": true,
  "verification_id": "ver_1a2b3c4d5e6f",
  "status": "verified",
  "confidence": 0.987,
  "extracted_data": {
    "document_type": "passport",
    "document_number": "123456789",
    "first_name": "John",
    "last_name": "Doe",
    "date_of_birth": "1990-01-15",
    "expiry_date": "2030-01-15",
    "nationality": "US",
    "sex": "M"
  },
  "fraud_score": 2,
  "checks": {
    "document_authentic": true,
    "mrz_valid": true,
    "face_detected": true,
    "tampering_detected": false
  }
}

Selfie Verification

POST/verify/selfie

Match a selfie photo against a document photo and perform liveness detection to prevent spoofing.

Request

curl -X POST https://api.klarifyid.online/v1/verify/selfie \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "selfie_image": "base64_encoded_selfie",
    "document_photo": "base64_encoded_document_photo",
    "liveness_check": true
  }'

Response

{
  "success": true,
  "verification_id": "ver_2b3c4d5e6f7g",
  "status": "verified",
  "face_match": {
    "matched": true,
    "confidence": 0.952,
    "similarity_score": 0.89
  },
  "liveness": {
    "is_live": true,
    "confidence": 0.978,
    "spoofing_detected": false
  }
}

Fraud Detection

GET/risk/email

Check email address for fraud indicators and disposable email patterns.

Request

curl -X GET "https://api.klarifyid.online/v1/risk/email?email=user@example.com" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "email": "user@example.com",
  "risk_score": 8,
  "is_disposable": false,
  "is_free_provider": false,
  "domain_age_days": 3650,
  "suspicious": false
}

IP Risk Analysis

GET/risk/ip

Analyze IP address for VPN, proxy, or bot activity and geographic risk factors.

Request

curl -X GET "https://api.klarifyid.online/v1/risk/ip?ip=203.0.113.42" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "ip": "203.0.113.42",
  "risk_score": 15,
  "country": "US",
  "city": "San Francisco",
  "is_vpn": false,
  "is_proxy": false,
  "is_tor": false,
  "is_hosting": false,
  "abuse_score": 2
}

Error Codes

CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Need Help?

Our support team is available 24/7 to help you integrate KlarifyID into your application.