Skip to main content

Create ABHA - Demographic authentication (Demo Auth)

Creates an ABHA number from Aadhaar demographic details (name, DOB, gender, state/district, mobile), without OTP or biometric.

POST/abha/api/v3/enrollment/enrol/byAadhaar

If an ABHA already exists for the Aadhaar, it is returned. Only for integrators approved by NHA, who must send the Benefit-Name header.

Endpoint: POST /abha/api/v3/enrollment/enrol/byAadhaar

Flow: Benefit - Child ABHA - step 1 of 6

  • Previous: none (first call of this flow)
  • Next: Create Child ABHA

Headers (plus Authorization: Bearer <gateway token>):

Header Required Description
TIMESTAMP yes Current UTC timestamp in ISO-8601 format.
REQUEST-ID yes Unique UUID for every request.
Benefit-Name yes Applicable for user who is enrolling via Benefit Program.

Request body for this use case:

Field Value / Type Required Description
authData object yes Authentication payload for this use case.
authData.authMethods ["demo_auth"] yes Authentication method used in this step.
authData.demo_auth object yes Demographic authentication block (Aadhaar demographic match).
authData.demo_auth.aadhaarNumber string yes Aadhaar number, RSA-encrypted.
authData.demo_auth.districtCode string yes LGD district code.
authData.demo_auth.stateCode string yes LGD state code.
authData.demo_auth.dateOfBirth string yes Date of birth as per Aadhaar (dd-MM-yyyy).
authData.demo_auth.gender string yes Gender (M / F / O).
authData.demo_auth.name string yes Full name.
authData.demo_auth.mobile string no Mobile number to be linked with the ABHA (plain, 10 digits).
authData.demo_auth.profilePhoto string no Base64 encoded profile photo.
authData.demo_auth.pinCode string no PIN code of the address.
authData.demo_auth.address string no Address as per Aadhaar.
consent object yes Consent captured from the user for ABHA enrolment.
consent.code string yes Consent code. Use ABHA-enrollment.
consent.version string yes Consent version. Use 1.4.

Responses

200

Success: DemoAuth API - New ABHA creation; DemoAuth API - In case of Existing ABHA Number

messagestring
tokensobject
tokens.tokenstring
tokens.expiresIninteger
tokens.refreshTokenstring
tokens.refreshExpiresIninteger
ABHAProfileobject
ABHAProfile.firstNamestring
ABHAProfile.middleNamestring
ABHAProfile.lastNamestring
ABHAProfile.dobstring
ABHAProfile.genderstring
ABHAProfile.mobilestring
ABHAProfile.phrAddressstring[]
ABHAProfile.districtCodestring
ABHAProfile.stateCodestring
ABHAProfile.abhaTypestring
ABHAProfile.stateNamestring
ABHAProfile.districtNamestring
ABHAProfile.ABHANumberstring
ABHAProfile.abhaStatusstring
isNewboolean
400

Bad Request (request validation failed): DemoAuth API-State District not matching

Error codes for this module

txnIdstring
timestampstring
401

Unauthorized (invalid / expired gateway token, X-token or benefit access): DemoAuth API-Invalid Benefit Name

Everything returns 401

messagestring
timestampstring
422

Unprocessable Entity (business rule or UIDAI failure): DemoAuth API-6 ABHA linked to Mobile; DemoAuth API-Details not matches against Aadhaar

Error codes for this module

errorobject
error.codestring
error.messagestring
500

Internal Server Error.

Error codes for this module