DocumentAadhaar Masking

Aadhaar Masking API — Redact Aadhaar Numbers

Automatically mask Aadhaar numbers in document images to comply with UIDAI guidelines. Upload an image and get a redacted version back.

curl -X POST "https://production.deepvue.tech/v1/documents/aadhaar-masking" \
  -H "Content-Type: application/json" \
  -H "X-Deepvue-Origin: acme-web" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "document": "<BASE64_ENCODED_DOCUMENT>",
  "consent": "Y"
}'
{
  "code": 200,
  "timestamp": null,
  "transaction_id": "a73af0b7accc4c3fbaa3dd2dc2cab550",
  "sub_code": "SUCCESS",
  "message": "Document Masked Successfully",
  "data": {
    "masked_document": "<BASE64_ENCODED_MASKED_DOCUMENT>"
  }
}
POST
/v1/documents/aadhaar-masking
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .

ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
API Key (header: x-api-key)
x-api-keystring
Required

The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.

The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Content-Typestring
Required

The media type of the request body

Options: application/json
header
X-Deepvue-Originstring

Identifies the product, service, or platform you are calling the API from. The value appears in the Caller column of Transaction logs and in dashboard analytics. - Use lowercase letters, digits, and hyphens only - Start with a letter or digit - Maximum 32 characters A value that does not match ^[a-z0-9][a-z0-9-]{0,31}$ is rejected with INVALID_ORIGIN_METADATA.

Min length: 1 • Max length: 32 • Pattern: ^[a-z0-9][a-z0-9-]{0,31}$
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .

header
x-api-keystring
Required

API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.

Headers

X-Deepvue-Originstring

Identifies the product, service, or platform you are calling the API from. The value appears in the Caller column of Transaction logs and in dashboard analytics.

  • Use lowercase letters, digits, and hyphens only
  • Start with a letter or digit
  • Maximum 32 characters

A value that does not match ^[a-z0-9][a-z0-9-]{0,31}$ is rejected with INVALID_ORIGIN_METADATA.

Example:
acme-web

Responses

codeinteger
timestampinteger
transaction_idstring
sub_codestring
messagestring
dataobject

Overview

The Aadhaar Masking API conceals sensitive information on Aadhaar documents by obscuring the QR code and the first 8 digits of the Aadhaar number. This enables verifications while limiting access to personal information, ensuring privacy and data security.

The API accepts either base64-encoded images or publicly accessible URLs of Aadhaar documents as input and returns the masked version in response.

Service providers shall not share, publish, or display Share Codes, XML files, or their contents, as per UIDAI regulations. Non-compliance may trigger legal action under multiple sections of The Aadhaar Act, 2016 and related regulations. Consent documentation should be mandatorily stored at the company end before proceeding with verification workflows.