Aadhaar Verification API
You send a 12-digit Aadhaar number with the user's consent. We tell you whether it exists and is active, plus age band, gender, state and whether a mobile is linked.
- Source
- UIDAI Aadhaar records (demographic status data, no biometrics)
- Turnaround
- Real time, usually a few seconds
- Endpoint
- POST /v1/aadhaar/verify
- Who can use it
- Any business can call it with the holder's consent, as long as you use the result only to confirm the number and don't store it unmasked.
Overview
A quick existence check on an Aadhaar number. You learn if the number is real and active, and roughly who it belongs to (age band, gender, state), without collecting an OTP or the full eKYC record. We use it as a first filter before anything heavier.
Good to know
It does not prove the person in front of you owns this Aadhaar. Pair it with an OTP, DigiLocker or a face match if you need that.
What you get
- Light-touch checkNo OTP and no document upload. The user only types the number, so it fits early in a sign-up form.
- Age band and stateGood enough to catch obvious mismatches, like a 22-year-old applicant whose Aadhaar shows the 60-70 band.
- Masked by defaultWe return the number with the first eight digits hidden, which is the form UIDAI rules let you keep.
- Mobile-link flagTells you whether a mobile is linked, so you know if an OTP-based step later will even work.
Request
POST https://api.ampletrails.com/v1/aadhaar/verify
| Field | Type | Status | Description |
|---|---|---|---|
id_number | string | Required | 12-digit Aadhaar number entered by the user |
consent | string | Required | Y if the user has given explicit consent for this check |
consent_text | string | Optional | Consent statement shown to the user, stored for your audit trail |
Response
Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.
| Field | Meaning | Example |
|---|---|---|
aadhaar_exists | Whether the Aadhaar number exists in UIDAI records | true |
status | Status of the Aadhaar number: ACTIVE or INACTIVE | ACTIVE |
age_band | Age range of the holder | 20-30 |
gender | Gender of the holder: M, F or T | M |
state | State of residence on record | Haryana |
mobile_linked | Whether a mobile number is linked to this Aadhaar | true |
masked_mobile | Last digits of the linked mobile, masked | XXXXXX7890 |
masked_aadhaar | Aadhaar number with the first 8 digits masked, safe to store | XXXXXXXX4321 |
Example
curl -X POST https://api.ampletrails.com/v1/aadhaar/verify \
-H "Authorization: Bearer $AMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id_number": "XXXXXXXX4321", "consent": "Y", "consent_text": "I agree to verify my Aadhaar for account opening."}'import os, requests
resp = requests.post(
"https://api.ampletrails.com/v1/aadhaar/verify",
headers={"Authorization": f"Bearer {os.environ['AMPLE_API_KEY']}"},
json={
"id_number": "XXXXXXXX4321",
"consent": "Y",
"consent_text": "I agree to verify my Aadhaar for account opening."
},
timeout=30,
)
resp.raise_for_status()
print(resp.json()["data"])const resp = await fetch("https://api.ampletrails.com/v1/aadhaar/verify", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AMPLE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"id_number": "XXXXXXXX4321",
"consent": "Y",
"consent_text": "I agree to verify my Aadhaar for account opening."
}),
});
const { data } = await resp.json();$ch = curl_init("https://api.ampletrails.com/v1/aadhaar/verify");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AMPLE_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode(["id_number" => "XXXXXXXX4321", "consent" => "Y", "consent_text" => "I agree to verify my Aadhaar for account opening."]),
]);
$data = json_decode(curl_exec($ch), true)["data"];{
"status": "success",
"request_id": "req_7f3a9c21e4",
"data": {
"aadhaar_exists": true,
"status": "ACTIVE",
"age_band": "20-30",
"gender": "M",
"state": "Haryana",
"mobile_linked": true,
"masked_mobile": "XXXXXX7890",
"masked_aadhaar": "XXXXXXXX4321"
}
}Example data. The exact field list for your account comes with your sandbox documentation.
Use cases
Pre-screening applicants
Lenders and gaming apps run it before asking for OTPs, so obviously fake numbers drop out early and cheaply.
Gig and staff onboarding
Agencies check the number a worker writes on a form before the worker is sent to a client site.
Age gating
The age band is usually enough to confirm someone is an adult without asking for their date of birth.
Questions about this API
Does this give me the person's name and address?
No. That needs the user's OTP (Aadhaar OTP eKYC), their offline XML or a DigiLocker fetch. This check stays at status, age band, gender and state.
Can I store the Aadhaar number after the check?
Only in masked form (last four digits visible) unless you are an entity allowed to keep it in an Aadhaar Data Vault. Store the masked_aadhaar field we return.
What if the user mistypes one digit?
Aadhaar numbers carry a Verhoeff check digit, so most typos fail format validation before we even call the source. You get a 400 error, not a charge for a failed lookup.
Why is mobile_linked false for some genuine users?
Many older Aadhaar records never had a mobile added, or the number was changed and not updated. Those users need to visit an Aadhaar Seva Kendra before any OTP flow will work for them.
Try the Aadhaar Verification API
Sandbox keys, the full field reference and a Postman collection, usually within a working day.