API endpoint

Citizen Verify

Checks whether an active citizen record exists and returns verification status.

Request fields

FieldDescriptionRequired
nid_number Required string. Use the citizen NID number stored in the system. Yes

Verify citizen

POST /api/v1/citizen/verify

Example request

curl -X POST "https://www.mosarofhosen.top/api/v1/citizen/verify" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -H "X-API-SECRET: your_api_secret" \
  -d '{"nid_number":"1234567890"}'

Success response · HTTP 200

{
    "success": true,
    "message": "তথ্য পাওয়া গেছে",
    "package_used": "citizen_verify",
    "endpoint_key": "citizen_verify",
    "charged": 2.25,
    "balance": 997.75,
    "data": {
        "nid_number": "1234567890",
        "is_valid": true,
        "status_checked": true,
        "afis_status": "MATCHED",
        "lock_flag": "0"
    }
}

Common error responses

The API returns JSON with the matching HTTP status. The message can vary according to the exact package, balance, citizen or file condition.

HTTP 401 Missing credentials

{
    "success": false,
    "message": "X-API-KEY and X-API-SECRET headers are required."
}

HTTP 403 IP not allowed

{
    "success": false,
    "message": "This server IP is not allowed for the API client."
}

HTTP 404 Citizen or file not found

{
    "success": false,
    "message": "সিটিজেন পাওয়া যায়নি"
}

HTTP 422 Package, balance or configuration error

{
    "success": false,
    "message": "No active API package was found. Purchase a package before using this service."
}

HTTP 429 Minute rate limit exceeded

{
    "success": false,
    "message": "Per-minute request limit exceeded.",
    "limit_type": "minute",
    "limit": 30,
    "used": 30,
    "remaining": 0,
    "retry_after_seconds": 42
}
Data protection: Citizen information must only be accessed and processed with proper authorization, consent and legal basis.