---
title: Multipage Aadhaar UID Masking API
slug: api-marketplace/multipage-aadhaar-uid-masking-api
description: Integrate the Aadhaar masking API to protect personal information in Aadhaar documents while maintaining their utility. Generate masked images that preserve the original structure and appearance, ensuring data protection and privacy. This API is especiall
createdAt: 2023-04-19T11:38:40.000Z
---

### Introduction

In today's era of digital data handling, safeguarding sensitive information like Aadhaar numbers is crucial. Multi-page Aadhaar Masking by Signzy is a cutting-edge solution designed to ensure compliance with UIDAI regulations, which mandate masking the first 8 digits of Aadhaar numbers stored in systems. Here's why it's a game-changer:

Key Highlights:

**Efficient and Accurate Processing**

- 99% accuracy in detecting and masking Aadhaar numbers.
- Real-time processing with an impressive response time of 0.25 seconds per page.

**Scalability for High-Volume Needs**

- Supports documents up to 128 pages in length.
- Batch processing capabilities for seamless handling of bulk Aadhaar data.

**Advanced Features**

- Automates masking for enhanced data security.
- Ensures compliance by masking QR codes, Virtual IDs (VIDs), and Unique IDs.

**Industry Applications**

- Ideal for banks, NBFCs, telecom providers and insurance firms.
- Simplifies onboarding, enhances KYC processes, and protects sensitive data across industries.

**Flexible Integration**

- Easily integrates with existing systems for smooth adoption and minimal disruption.

**Performance metrics:**

Average classification and masking time: **0.25 seconds per page**

Accuracy: \~**99%**

ID support: **Aadhaar Letter, eAadhaar, and Aadhaar PVC card, mAadhaar**

***

### API Details

**Endpoint:**

:::CodeblockTabs
Production Environment

```none
POST https://api.signzy.app/api/v3/aadhaar/classification-masking
```
:::

:::CodeblockTabs
UAT/Testing environment

```none
POST https://api-preproduction.signzy.app/api/v3/aadhaar/classification-masking
```
:::

***

**Request headers:**

| **Name**      | **Value**        | **Required** | **Description**                                                                                            |
| ------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Yes          | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXX      | Yes          | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

**Request body parameters:**

| **Parameter** | **Data Type** | **Description**                                                                                          | **Required** |
| ------------- | ------------- | -------------------------------------------------------------------------------------------------------- | ------------ |
| urls          | Array         | URLs where the document to be masked is hosted. You can use Signzy's Persist API to do the same as well. | Yes          |

```json
{
    "urls": [
        "https://domain/...hosted_image.../image.jpg"
    ]
}
```

***

**Code samples:**

:::CodeblockTabs
```curl
curl --location 'https://api.signzy.app/api/v3/aadhaar/classification-masking' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Token>' \
--data '{
    "urls": [
        "https://domain/...hosted_image.../image.jpg"
    ]
}'
```

```nodejs
const axios = require('axios');

const makeApiCall = async () => {
    try {
        const url = 'https://api-preproduction.signzy.app/api/v3/aadhaar/maskers';
        const token = '<Token>'; // Replace with your actual token
        const data = {
            urls: [
                "https://domain/...hosted_image.../image.jpg"
            ]
        };

        const headers = {
            'Content-Type': 'application/json',
            'Authorization': token
        };

        const response = await axios.post(url, data, { headers });
        console.log('Response:', response.data);
    } catch (error) {
        console.error('Error:', error.response ? error.response.data : error.message);
    }
};

makeApiCall();

```

```python
import requests

def make_api_call():
    url = "https://api-preproduction.signzy.app/api/v3/aadhaar/maskers"
    token = "<Token>"  # Replace with your actual token
    headers = {
        "Content-Type": "application/json",
        "Authorization": token
    }
    payload = {
        "urls": [
            "https://domain/...hosted_image.../image.jpg"
        ]
    }

    try:
        response = requests.post(url, json=payload, headers=headers)
        response.raise_for_status()  # Raise HTTPError for bad responses (4xx and 5xx)
        print("Response:", response.json())
    except requests.exceptions.RequestException as e:
        print("Error:", e)

if __name__ == "__main__":
    make_api_call()

```

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
)

func makeApiCall() {
	url := "https://api-preproduction.signzy.app/api/v3/aadhaar/maskers"
	token := "<Token>" // Replace with your actual token

	payload := map[string]interface{}{
		"urls": []string{"https://domain/...hosted_image.../image.jpg"},
	}
	payloadBytes, err := json.Marshal(payload)
	if err != nil {
		fmt.Println("Error marshalling payload:", err)
		return
	}

	req, err := http.NewRequest("POST", url, bytes.NewBuffer(payloadBytes))
	if err != nil {
		fmt.Println("Error creating request:", err)
		return
	}

	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", token)

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		fmt.Println("Error making request:", err)
		return
	}
	defer resp.Body.Close()

	if resp.StatusCode >= 200 && resp.StatusCode < 300 {
		var responseData map[string]interface{}
		json.NewDecoder(resp.Body).Decode(&responseData)
		fmt.Println("Response:", responseData)
	} else {
		fmt.Printf("Error: %s\n", resp.Status)
	}
}

func main() {
	makeApiCall()
}

```
:::

***

**Response body parameters:**

| **Parameter** | **Data type** | **Description**                                        |
| ------------- | ------------- | ------------------------------------------------------ |
| maskedPdfUrl  | String        | Link of the document with all Aadhaar masked inside it |

:::CodeblockTabs
200

```json
{
   "maskedPdfUrl": "https://persist.signzy.tech/api/files/1118726134/download/9ac355a3d0803f5dea853a.pdf"
}
```

400

```json
{
    "error": {
        "name": "Validation Error",
        "status": "400",
        "msg": "Input should be a valid URL, input is empty",
        "responseCode": "fail"
    }
}

// No url passed
{
    "error": {
        "name": "Validation Error",
        "status": "400",
        "msg": "List should have at least 1 item after validation, not 0",
        "responseCode": "fail"
    }
}

// More than 1 url passed
{
    "error": {
        "name": "Validation Error",
        "status": "400",
        "msg": "List should have at most 1 item after validation, not 2",
        "responseCode": "fail"
    }
}

//Bad Request
{
    "error": "Failed to download PDF"
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```

422

```json
{
    "error": {
        "status": 422,
        "msg": "Unable to download the file.",
        "responseCode": "fail"
    }
}
```
:::

***

### Document(to be masked) related Constraints:

- Our API supports the following types of masking of Aadhar documents: **Aadhaar Letter, eAadhaar, and Aadhaar PVC card.**

::Image[]{src="https://api.archbee.com/api/optimize/w0YdjmC6Uxu0AJ6sPj9OT/UoicLKIfVKsQC6GdrbYd3_all-aadhaar-cards-3.jpg" size="100" width="735" height="420" position="center" caption="Types of Aadhaar documents" showCaption="true" indent="3"}

- The document being shared as part of the API payload can b&#x65;**&#x20;multi-page.**
- Size should not exceed **10MB.**
- Supported document types:
  - **PDF**
- For best results, make sure that the image you use **fits tightly in the camera view** and is **horizontally aligned.**

  ::Image[]{src="https://api.archbee.com/api/optimize/w0YdjmC6Uxu0AJ6sPj9OT/c1yPTVs1o9U1Ol2FkREl5_all-aadhaar-cards-2-2.jpg" size="90" width="746" height="484" position="center" showCaption="false"}

***

### API Performance&#x20;

| Latency      | Defines the time it takes for a request to travel from one place to another and get a response back. | Approx 0.25 seconds per page              |
| ------------ | ---------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| Success rate | Defines how often the API performs its intended function without any errors or problems.             | \~99%(Processing valid Aadhaar documents) |

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!



###

