Live demo of agent247 on Digio's docs — click the orange button at the bottom right to start.

The API is used to Mask Aadhaar Number of an individual. It mask the first eight digits of the Aadhaar number on a copy of the Aadhaar card, leaving only the last four digits visible. Digio Aadhaar masking API can be used to mask the aadhaar image file in JPG/JPEG/PNG or pdf format. It can also be used to mask Base64 encoded Aadhaar image files.

For API Base URL's, click here. Kindly append the Base URL to the API endpoints below to integrate
Digio Apis

Getting started with Digio Rest Apis

API SERVER

SELECTED: https://api.digio.in
AUTHENTICATION
No API key applied
General ⦂

Aadhaar Masking API

post {BASE_URL}/v4/client/kyc/aadhaar/file/mask

Call this API to get masked image of the Aadhaar Card

Requires Base 64 encoded clientId:clientSecret in Authorization header
REQUEST
REQUEST BODY multipart/form-data
API Server
https://api.digio.in
Authentication
Required (None Applied)
curl -X POST "https://api.digio.in/v4/client/kyc/aadhaar/file/mask" \
 -H 'accept: application/json' 
RESPONSE
application/json
object
Single line description
Field
Type
Description
masked_output
string

Base64 encoded image of Masked Aadhaar Card

error_message
string

Error message indicating cause of error.

- details
object

Masking Details

already_masked_count
integer

Number of instances where detail was already masked. eg. If a document has 3 instances of Aadhaar number where 2 instances are already masked, then this count will bet 2

masking_done_count
integer

Number of instances where the masking is done eg. In a document if Aadhaar number appears 4 times in a document then this count will be 4

application/json
object
Single line description
Field
Type
Description
details
string

Details about the exception. Usually contains the exception id for reference.

code
string

Error code

message
string

Description of the error

errors
string

Custom errors

Digio Apis

Getting started with Digio Rest Apis

API SERVER

SELECTED: https://api.digio.in
AUTHENTICATION
No API key applied
General ⦂

Aadhaar Masking API (Base64 Approach)

post {BASE_URL}/v4/client/kyc/aadhaar/mask

Request Body Params (application/json)

Allowed:  
PNG
| JPEG
| JPG
| PDF
Allowed:  
yes
| no

Call this API to get Masked Image of the Aadhaar Card Please Note: Try to keep the file size as small as possible for faster results and not more than 1 MB as a good practice.

Requires Base 64 encoded clientId:clientSecret in Authorization header
REQUEST
REQUEST BODY application/json
object
Single line description
Field
Type
Description
reference_id
string

Reference ID

Constraints: 1 to 32 chars
Pattern: ^[A-Za-z0-9-_]*$
unique_request_id
string

Unique request id for traceability of request and recon purpose. Businesses are required to pass unique id for every request.

Constraints: 1 to 32 chars
Pattern: ^[A-Za-z0-9-_]*$
data *
string

Base64 encoded Aadhaar image file in JPEG/JPG or PNG format. If you want to use PDF pass another attribute “data_content_type”:”PDF”

file_name
string

Response file name if it has to be a specific one. Always given with .png

data_content_type
enum

It is the type of file upload supported for masking.

Allowed: PNG┃JPEG┃JPG┃PDF
is_validate
boolean

Pass True if you wish to get the document validated (whether it is an Aadhaar or not)

consent *
enum

yes/no

Default: yes
Allowed: yes┃no
mask_qr
boolean

true/false

API Server
https://api.digio.in
Authentication
Required (None Applied)
curl -X POST "https://api.digio.in/v4/client/kyc/aadhaar/mask" \
 -H 'accept: application/json' 
RESPONSE
application/json
object
Single line description
Field
Type
Description
masked_output
string

Base64 encoded image of Masked Aadhaar Card

error_message
string

Error message indicating cause of error.

- details
object

Masking Details

already_masked_count
integer

Number of instances where detail was already masked. eg. If a document has 3 instances of Aadhaar number where 2 instances are already masked, then this count will bet 2

masking_done_count
integer

Number of instances where the masking is done eg. In a document if Aadhaar number appears 4 times in a document then this count will be 4

application/json
object
Single line description
Field
Type
Description
details
string

Details about the exception. Usually contains the exception id for reference.

code
string

Error code

message
string

Description of the error

errors
string

Custom errors

Was this page helpful?