Mask Aadhaar
Mask sensitive information from Aadhaar card documents
Overview
This API masks sensitive information from Aadhaar card images or PDFs to protect privacy while maintaining document usability. Perfect for KYC workflows where you need to collect and store documents securely.Supported Formats
- Images: JPG, JPEG, PNG
- Documents: PDF
Required Information
- Document URL: Publicly accessible URL of the Aadhaar document
- Consent: Must be “yes” to proceed with masking
Masking Options
Control exactly what gets masked:| Option | Default | Description |
|---|---|---|
mask_qr | false | Mask the QR code on the Aadhaar card |
mask_all_digits | false | Mask all digits of the Aadhaar number |
extract_last_four_digits | false | Extract only last 4 digits (e.g., returns “6032”) |
Common Use Cases
1. Standard KYC Masking
Mask all digits and extract the last 4 for verification:2. Complete Privacy
Mask everything without extracting digits:Response Data
- Masked Document URL: Link to the masked version (valid for 30 days)
- Original Document URL: Link to the secure original (valid for 30 days)
- Last 4 Digits: Returned if
extract_last_four_digitswas enabled - Detection Status: Indicates if an Aadhaar number was found in the document
Important Notes
- The document URL must be publicly accessible during processing
- Consent must be explicitly set to “yes”
- Poor quality images may fail to process
Authorizations
API key issued by KonnectNXT. Pass as Authorization: Bearer <your_api_key>.
Body
Publicly accessible URL of the Aadhaar document to be masked. Supports both images (JPG, PNG) and PDF documents.
10 - 2048^https?://.+"https://example.com/documents/aadhaar_card.jpg"
User consent for masking the document. Must be 'yes' to proceed with masking.
yes, no "yes"
Whether to mask the QR code on the Aadhaar card. Set to true to mask, false to keep visible.
true
Whether to mask all digits of the Aadhaar number. Set to true to mask all digits, false to keep visible.
true
Whether to extract and show only the last four digits of Aadhaar number. Set to true to extract last 4 digits (e.g., returns '6032' in id_number field), false to return null.
true
Response
Aadhaar masked successfully
Overall status of the API
success, error HTTP status code
400
Description of the response or error
"Invalid request parameters"
Represents the total number of credits used in this request.
3
Represents the remaining credits available for use.
4040

