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 "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"document": "example_string",
"consent": "example_string"
}'
import requests
import json
url = "https://production.deepvue.tech/v1/documents/aadhaar-masking"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
}
data = {
"document": "example_string",
"consent": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/documents/aadhaar-masking", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
},
body: JSON.stringify({
"document": "example_string",
"consent": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"document": "example_string",
"consent": "example_string"
}`)
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/documents/aadhaar-masking", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/documents/aadhaar-masking')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request['x-api-key'] = 'YOUR_API_KEY'
request.body = '{
"document": "example_string",
"consent": "example_string"
}'
response = http.request(request)
puts response.body
{
"code": 200,
"timestamp": null,
"transaction_id": "string",
"sub_code": "SUCCESS",
"message": "Document Masked Successfully",
"data": {
"masked_document": "string"
}
}
{
"code": 200,
"timestamp": null,
"transaction_id": "string",
"sub_code": "INVALID_DOCUMENT",
"message": "Invalid ID Card, ID number not found."
}
{
"detail": "Inactive client_id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Not a valid token"
}
{
"code": 422,
"timestamp": 1711487837359,
"transaction_id": "string",
"sub_code": "NO_CONSENT",
"message": "Consent not taken"
}
{
"code": 422,
"timestamp": 1711487837359,
"transaction_id": "string",
"sub_code": "INVALID_IMAGE",
"message": "Image is non compliant to request/quality standard"
}
{
"code": 422,
"timestamp": 1711487837359,
"transaction_id": "string",
"sub_code": "EMPTY_DOCUMENT",
"message": "Empty document. Valid base64 or URL is required."
}
{
"code": 422,
"timestamp": null,
"transaction_id": "string",
"sub_code": "INVALID_URL",
"message": "Invalid URL"
}
{
"code": 500,
"timestamp": null,
"transaction_id": "string",
"sub_code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}
/v1/documents/aadhaar-masking
ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
The media type of the request body
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token (JWT). ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Responses
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.
Last updated 4 weeks ago
Built with Documentation.AI