PAN MASKING
Introduction
The PAN MASKING API provides a simple way to mask the entire PAN Number present on a PAN Card.This API will receive an image with a PAN Card in it with a PAN Number, which the API will end up masking with a desired format of blur effect or a particular colour mentioned as part of the input of the API.
The API should also give out the cropped out PAN Number area from the image in output and optionally the same input image in output with the PAN Number area being masked on top of it.
This API enables seamless integration into applications, ensuring the protection of personally identifiable information (PII) while maintaining the utility of PAN documents.
The masked PAN images generated by the API maintain the structural and visual aspects of the original document, making it suitable for display or storage while ensuring compliance with privacy regulations. The API response includes URLs of the masked images, which can be retrieved and used within applications or systems.
By incorporating the PAN Masking API into your applications, you can enhance data protection, privacy, and compliance measures. This is particularly beneficial for applications that handle PAN documents and require secure handling of sensitive information. Customers (banks, NBFCs, fintechs, lenders, insurers, brokers) routinely capture PAN cards during onboarding. They are required to verify the PAN, but are not permitted to retain the unmasked number in downstream systems (CRM, support tools, BPO desks, archive storage, customer-app history). Doing the masking manually is operationally infeasible at onboarding scale; doing it with naive image-edit tools is error-prone and produces inconsistent output.
The product gap is a single, deterministic, audit-friendly API that takes a PAN card image and returns a redacted version plus the evidence of where the redaction occurred.
API Details
Endpoint:
POST https://api.signzy.app/api/v3/pan/maskersPOST https://api-preproduction.signzy.app/api/v3/pan/maskersRequest body parameters:
Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
confidence_threshold | number | No | 0.25 | Minimum detection confidence threshold (0.0-1.0) min: 0; max: 1 |
image | string (img_url) | Yes | - | Upload PAN card image to detect and mask the PAN number accepts: image/png, image/jpeg, image/webp, image/pdf |
redact_color | string (color) | No | "#000000" | Color of the redaction cover box (hex, e.g. #000000 for black). Only used when redact_type is cover. |
redact_type | string | No | "cover" | Redaction method: cover paints a solid color over the region, blur applies a Gaussian blur values: cover, blur |
{
"input": {
"confidence_threshold": 0,
"redact_color": "",
"redact_type": "",
"image": "img_url"
}
}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. |
Code samples:
curl --location 'https://api-preproduction.signzy.app/api/v3/pan/maskers' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_key>' \
--data '{
"input":
{
"confidence_threshold": 0.25,
"redact_color": "#000000",
"redact_type": "cover",
"image": "img_url"
}
}'Response body parameters:
Parameter | Data type | Description |
|---|---|---|
success | boolean | True or False |
message | string | The value tells whether Signzy has masked the ID number in the output. Possible response values are "yes" or "no". "no" means Signzy didn't mask the ID number, either because the document was not as intended or it does not contain the ID number to be masked. |
result.detection_count | Number | Number of PAN numbers detected, visible in the PAN image by the model. |
result.image_dimensions.height | Number | Dimension of the image |
result.image_dimensions.width | Number | Dimension of the image |
masked_image | String | Masked image output |
processing_time_ms | Number | Processing time for perform masking |
{
"result": {
"detection_count": 1,
"image_dimensions": {
"height": 699,
"width": 1074
},
"masked_image": "img_url",
"processing_time_ms": 54
}
}Constraints & Supported Scenarios
Input Expectation – Unmasked PAN Image
- The API is designed to process PAN images/documents where the PAN number is fully visible and unmasked.
- If an already masked PAN Number image is provided as input, the API might super impose it with another masking or might not due to the invisibility of the PAN Number.
- Expected input: Unmasked PAN image/document only.
Supported Document Type
- The API currently supports masking only for PAN Card documents.
- Other ID types are not supported, including but not limited to:
- Driving Licence
- Voter ID
- Aadhaar
- Any other government or non-government identity documents
Single PAN Document Support
- The API currently supports only a single PAN document/image per request.
- Multi-document, mixed-document images or multi pan in single image are not recommended, as the API may still return a masked image but the behavior and output can vary.
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 [email protected]. 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!