In short
- This workflow gives a KYC-verified ABHA number and ABHA address.
- Send the Aadhaar number, verify the OTP, choose an address, then call Create.
- Each call takes the latest
txn_id. - A patient who already has an ABHA on this Aadhaar logs in with Auto Login instead.
When to use this
The patient has an Aadhaar number and can receive an OTP on the mobile linked to it. This workflow produces a KYC-verified 14-digit ABHA number and an ABHA address such asshyam@abdm. Aadhaar is the KYC.
Alternatives:
- The patient will not use Aadhaar: Create an ABHA address with mobile OTP. That address is not KYC-verified.
- Assisted creation where the patient authenticates with their face on a mobile device instead of an OTP: Create an ABHA with face authentication.
- The patient already knows their ABHA address: Log in to an existing ABHA.
Before you start
- A client access token, sent as a Bearer token on every call. See Client login.
- Your facility onboarded as a Health Information Provider (HIP), with its HIP ID. You can send it in the optional
X-Hip-Idheader. - Your own patient id for this person. You can send it in the optional
X-Partner-Pt-Idheader. - A webhook endpoint registered with Eka, so you receive
abha.created. See Register a webhook. - In hand:
- the patient’s 12-digit Aadhaar number
- the 10-digit mobile number they want on the ABHA
- their consent to use Aadhaar, recorded on your side
Sequence
Steps
1
Send the Aadhaar number
Send
aadhaar_number to Generate OTP. ABDM sends an OTP to the mobile linked to that Aadhaar. The response carries txn_id and a hint with the masked mobile number, for example OTP sent successfully to your mobile number ******90973. Show the hint to the patient so they know which phone to check.Keep txn_id. Every later call in this workflow takes the txn_id from the most recent response.If the OTP does not arrive, send txn_id to Resend OTP. It returns a txn_id; use that one from now on. 2
Verify the Aadhaar OTP
Send
txn_id, the otp the patient reads out, and mobile to Verify OTP. All three are required. mobile is the number the ABHA will be linked to. It can differ from the mobile linked to the Aadhaar.The response carries a new txn_id, skip_state, abha_profiles, profile and eka.oid. Read skip_state and abha_profiles to decide the next call:skip_stateisconfirm_mobile_otp: themobileyou sent is not the one linked to the Aadhaar. Go to the next step to verify it.skip_stateisabha_createandabha_profilesis empty: the patient has no ABHA address on this Aadhaar. Skip to “Choose an ABHA address”.skip_stateisabha_createandabha_profilesis non-empty: the patient already has one or more ABHA addresses. Show eachabha_addressandnamefromabha_profiles. If the patient picks one, go to “Log in to the existing address”. If they want a new one, go to “Choose an ABHA address”.skip_stateisabha_select: the patient has several ABHA addresses and must choose one to log in.skip_stateisabha_end: the flow is complete; no further call is needed.
3
Verify the new mobile (only if skip_state is confirm_mobile_otp)
An OTP goes to the
mobile you sent in the previous step. Send txn_id and that otp to Mobile Verify OTP. The response has the same shape as Verify OTP. Read skip_state and abha_profiles again and branch exactly as in the previous step.If this OTP does not arrive, send txn_id to Mobile Resend OTP and use the txn_id it returns.4
Choose an ABHA address
The patient chooses the ABHA address to create. Two helpers make this reliable.Call Suggest ABHA Address with
transactionId set to your current txn_id. You can also pass fn, mn, ln and dob (format YYYY-MM-DD). The response’s suggestions lists available addresses.Before you submit, send the chosen abha_address to Does ABHA Address Exist. If exists is true, ask the patient for another one.5
Log in to the existing address (only if the patient picked one)
Send
txn_id and the chosen abha_address from abha_profiles to Auto Login. Read its response as in Complete the Aadhaar login, and see Milestone 1. The patient is logged in. Stop here; do not call Create.6
Create the ABHA
Send
txn_id and the chosen abha_address to Create. Both are required. The response carries:profile.abha_number: the 14-digit ABHA number, for example12-3456-7856-8912.profile.abha_address: the patient’s ABHA address.eka.oid: Eka’s id for this patient. Later calls take it in theX-Pt-Idheader or theoidquery parameter.tokenandrefresh_token: the ABHA tokens ABDM issues.skip_state.
abha.created webhook to your server. Its data carries abha_address, abha_number, oid, hip_id and partner_patient_id. Use the webhook, not only the API response, to provision the patient in your database. Acknowledge it and verify its signature as described in Webhooks. State you must persist
When it fails
Error responses carrycode, error and source_error. source_error.code holds codes such as MIS-1013.
Test it
The testing page has the sandbox base URL, credentials and the happy path for every journey.- Happy path: Generate OTP, Verify OTP with
mobileset to the Aadhaar-linked number, Suggest, Does ABHA Address Exist returnsexists: false, Create. The response hasprofile.abha_numberandeka.oid. -
abha.createdarrives with the sameabha_addressandoid, and its signature verifies. - Wrong OTP once, then the correct OTP:
MIS-1013, then success. Record the code you receive; the expected code is not confirmed. - Verify OTP with a
mobilethat is not the Aadhaar-linked one:skip_stateisconfirm_mobile_otp, then Mobile Verify OTP succeeds. - Resend on both OTPs: each returns a
txn_idthat the next call accepts. - Second run with the same Aadhaar: Verify OTP returns
abha_createwith a non-emptyabha_profiles; Auto Login succeeds. - Create with an address that Does ABHA Address Exist reports as taken:
ABDM-1101. Record the code you receive; the expected code is not confirmed.

