Aadhaar eSign API
Takes a PDF and a list of signers, sends each a signing link, collects Aadhaar OTP eSignatures and returns the signed PDF and audit trail.
- Source
- Licensed eSign Service Provider (ESP) using Aadhaar OTP authentication
- Turnaround
- Depends on the signer; usually minutes. Status by webhook
- Endpoint
- POST /v1/esign/request
- Who can use it
- Businesses with signer consent. Signers need an Aadhaar-linked mobile number.
Overview
Aadhaar eSign lets someone sign a document by entering an OTP sent to their Aadhaar-linked mobile. The signature is issued through a licensed eSign Service Provider and is valid under the Information Technology Act. Send us a PDF and the signers, and we send each signer a link, collect the signatures and return the signed PDF with an audit trail.
Good to know
Not every document can be e-signed under Indian law. eSign proves who signed and when, not that they read or understood the document.
What you get
- Several signers, set orderBorrower, co-borrower and guarantor can sign in the order you choose.
- Signature where you want itSet the page and position for each signer, so the signed PDF looks like your paper version.
- Audit trail includedEach signature carries the signer's name, time stamp and certificate details.
- Webhooks for statusKnow when each person signs, and chase the ones who haven't.
Request
POST https://api.ampletrails.com/v1/esign/request
| Field | Type | Status | Description |
|---|---|---|---|
document | string | Required | PDF to sign, as base64 or HTTPS URL |
signers | array | Required | Signers with name, mobile/email and signature position |
reason | string | Optional | Reason shown on the signature |
callback_url | string | Optional | Webhook called when signing completes |
Response
Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.
| Field | Meaning | Example |
|---|---|---|
request_id | eSign request identifier | es_92c1b7 |
signing_links | Per-signer links to sign | […] |
status | Request status (pending, partially_signed, completed, expired) | pending |
signed_document_url | Signed PDF once complete | null |
audit_trail | Signer name, timestamp and certificate details for each signature | […] |
Example
curl -X POST https://api.ampletrails.com/v1/esign/request \
-H "Authorization: Bearer $AMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"document": "https://example.com/agreement.pdf", "signers": "[{\"name\":\"Ravi Kumar\",\"mobile\":\"9876543210\",\"page\":3}]", "reason": "Loan agreement", "callback_url": "https://example.com/webhooks/esign"}'import os, requests
resp = requests.post(
"https://api.ampletrails.com/v1/esign/request",
headers={"Authorization": f"Bearer {os.environ['AMPLE_API_KEY']}"},
json={
"document": "https://example.com/agreement.pdf",
"signers": "[{\"name\":\"Ravi Kumar\",\"mobile\":\"9876543210\",\"page\":3}]",
"reason": "Loan agreement",
"callback_url": "https://example.com/webhooks/esign"
},
timeout=30,
)
resp.raise_for_status()
print(resp.json()["data"])const resp = await fetch("https://api.ampletrails.com/v1/esign/request", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AMPLE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"document": "https://example.com/agreement.pdf",
"signers": "[{\"name\":\"Ravi Kumar\",\"mobile\":\"9876543210\",\"page\":3}]",
"reason": "Loan agreement",
"callback_url": "https://example.com/webhooks/esign"
}),
});
const { data } = await resp.json();$ch = curl_init("https://api.ampletrails.com/v1/esign/request");
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(["document" => "https://example.com/agreement.pdf", "signers" => "[{\"name\":\"Ravi Kumar\",\"mobile\":\"9876543210\",\"page\":3}]", "reason" => "Loan agreement", "callback_url" => "https://example.com/webhooks/esign"]),
]);
$data = json_decode(curl_exec($ch), true)["data"];{
"status": "success",
"request_id": "req_7f3a9c21e4",
"data": {
"request_id": "es_92c1b7",
"signing_links": "[…]",
"status": "pending",
"signed_document_url": null,
"audit_trail": "[…]"
}
}Example data. The exact field list for your account comes with your sandbox documentation.
Use cases
Loan agreements
Sign sanction letters and loan agreements as part of the digital journey.
Account opening forms
Get account opening forms signed digitally.
HR and vendor contracts
Offer letters, NDAs and vendor agreements signed without printing anything.
Questions about this API
Is Aadhaar eSign legally valid?
Yes. eSign through a licensed ESP is recognised as an electronic signature under the IT Act, 2000. Some documents, such as wills and property sale deeds, are excluded from electronic signing by law.
What does the signer need?
Their Aadhaar number or VID and access to the mobile number linked with Aadhaar to receive the OTP.
What if the signer's mobile isn't linked to Aadhaar?
They can't complete OTP eSign. Offer a fallback such as DSC signing or a physical signature.
How long does a signing link stay valid?
You set the expiry. Expired requests return status expired and you can resend.
Try the Aadhaar eSign API
Sandbox keys, the full field reference and a Postman collection, usually within a working day.