> ## Documentation Index
> Fetch the complete documentation index at: https://telr-docs.cashfree.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Aadhaar Masking

> Use this API to mask the first 8 digits of your customer's aadhaar number and block the QR code (if it exists). Masking aadhaar card of your customers ensures privacy and makes it storable in your database. View the [test data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#aadhaar-masking) and use the information to trigger the validations. The test data are usable only in test environments such as gamma and sandbox.
 ### Response Codes 
 | Sub Code         |     Status    |    Message                                                  | Next Action 
 | ---------------- |---------------|-------------------------------------------------------------|-------------------------| 
  | 200      | SUCCESS | VALID                                                      | -                                                                | 
 | 200      | SUCCESS | INVALID_DOCUMENT                                           | Upload a valid copy of the aadhaar.                              | 
 | 400      | ERROR   | x-client-id is missing in the request                      | Enter all the header information in the API request.             | 
 | 400      | ERROR   | image is missing in the request                      | Upload the image file of the aadhaar card that needs masking.             | 
 | 400      | ERROR   |verification_id can include only alphanum, dot, hyphen and underscores                      | Only alphanumeric, period (.), hyphen (-), and underscore ( _ ) are allowed.             | 
 | 400              | ERROR         | Client secret belongs to test environment                      | Enter the correct environment credentials in the request. 
 | 401      | ERROR   | Invalid clientId and clientSecret combination              | Enter valid client ID and secret key in the request.             | 
 | 403      | ERROR   | IP not whitelisted your current ip is 106.51.91.104.For IP whitelisting assistance, visit our guide at https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification                                         | Whitelist the IP address.                                        | 
 | 409      | ERROR   | verification ID already exists                             | Enter a unique verification ID.                                  | 
 | 413      | ERROR   | file size exceeded                                         | The maximum file size should be 10 MB.                           | 
 | 422      | ERROR   | Insufficient balance to process this request.              | Ensure you have sufficient balance and then process the request. | 
 | 500      | ERROR   | something went wrong                                       | Try after some time.



## OpenAPI

````yaml post /aadhaar-masking
openapi: 3.0.0
info:
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  title: Cashfree Verification API's.
  version: '2023-12-18'
  description: >-
    Cashfree's Verification APIs provide different types of verification to our
    merchants.
servers:
  - description: Sandbox Server
    url: https://sandbox.cashfree.com/verification
  - description: Production Server
    url: https://api.cashfree.com/verification
security: []
tags:
  - name: Aadhaar
    description: Operations related to Aadhaar verification.
  - name: BAV V2
    description: Operations related to Bank account verification v2.
  - name: PAN
    description: Operations related to PAN verification.
  - name: Digilocker
    description: Operations related to Digilocker verification.
  - name: E-sign
    description: Operations related to E-sign verification.
  - name: Reverse Penny Drop
    description: Operations related to Reverse Penny Drop verification.
  - name: IP
    description: Operation related to IP verification.
  - name: UPI
    description: Operations related to UPI verification.
  - name: Passport
    description: Operation related to Passport verification.
  - name: CIN
    description: Operation related to CIN verification.
  - name: Name Match
    description: Operation related to Name Match verification.
  - name: PAN to GSTIN
    description: Operation related to PAN to GSTIN.
  - name: Face Match
    description: Operation related to Face Match verification.
  - name: Voter ID
    description: Operation related to Voter ID verification.
  - name: Reverse Geocoding
    description: Operation related to Reverse Geocoding.
  - name: Liveliness
    description: Operation related to Liveliness.
  - name: Vehicle RC
    description: Operation related to Vehicle RC verification.
  - name: Driving License
    description: Operation related to Driving License verification.
  - name: GSTIN
    description: Operation related to GSTIN verification.
  - name: Account Aggregator
    description: Operations related to Account aggregator.
  - name: OTPLess
    description: Operations related to OTPLess Verification.
  - name: 1-Click
    description: Operations related to 1-Click.
  - name: BharatOCR
    description: Operations related to BharatOCR.
paths:
  /aadhaar-masking:
    post:
      tags:
        - Aadhaar
      summary: Aadhaar Masking
      description: >-
        Use this API to mask the first 8 digits of your customer's aadhaar
        number and block the QR code (if it exists). Masking aadhaar card of
        your customers ensures privacy and makes it storable in your database.
        View the [test
        data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#aadhaar-masking)
        and use the information to trigger the validations. The test data are
        usable only in test environments such as gamma and sandbox.
         ### Response Codes 
         | Sub Code         |     Status    |    Message                                                  | Next Action 
         | ---------------- |---------------|-------------------------------------------------------------|-------------------------| 
          | 200      | SUCCESS | VALID                                                      | -                                                                | 
         | 200      | SUCCESS | INVALID_DOCUMENT                                           | Upload a valid copy of the aadhaar.                              | 
         | 400      | ERROR   | x-client-id is missing in the request                      | Enter all the header information in the API request.             | 
         | 400      | ERROR   | image is missing in the request                      | Upload the image file of the aadhaar card that needs masking.             | 
         | 400      | ERROR   |verification_id can include only alphanum, dot, hyphen and underscores                      | Only alphanumeric, period (.), hyphen (-), and underscore ( _ ) are allowed.             | 
         | 400              | ERROR         | Client secret belongs to test environment                      | Enter the correct environment credentials in the request. 
         | 401      | ERROR   | Invalid clientId and clientSecret combination              | Enter valid client ID and secret key in the request.             | 
         | 403      | ERROR   | IP not whitelisted your current ip is 106.51.91.104.For IP whitelisting assistance, visit our guide at https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification                                         | Whitelist the IP address.                                        | 
         | 409      | ERROR   | verification ID already exists                             | Enter a unique verification ID.                                  | 
         | 413      | ERROR   | file size exceeded                                         | The maximum file size should be 10 MB.                           | 
         | 422      | ERROR   | Insufficient balance to process this request.              | Ensure you have sufficient balance and then process the request. | 
         | 500      | ERROR   | something went wrong                                       | Try after some time.
      operationId: VrsMaskAadhaar
      parameters:
        - $ref: '#/components/parameters/x_cf_signature'
      requestBody:
        description: Find the request parameters to mask aadhaar number
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              example:
                image: image
                verification_id: testverificationid
              required:
                - image
                - verification_id
              properties:
                image:
                  description: >-
                    It is the image file of the aadhaar card that needs masking.
                    Accepted formats - short, long, and PVC. Allowed file type -
                    JPEG/JPG/PNG. The maximum file size should be 10 MB.
                  format: binary
                  type: string
                  example: image
                verification_id:
                  type: string
                  description: >-
                    It is the unique ID you create to identify the verification
                    request. The maximum character limit is 50. Only
                    alphanumeric, period (.), hyphen (-), and underscore ( _ )
                    are allowed.
                  example: testverificationid
                  default: testverificationid
      responses:
        '200':
          $ref: '#/components/responses/AadhaarMaskingResponse'
        '400':
          $ref: '#/components/responses/Response400AadhaarMaskingresponse'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '409':
          $ref: '#/components/responses/Response409DuplicateId'
        '413':
          $ref: '#/components/responses/Response413'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500V2'
      security:
        - XClientID: []
          XClientSecret: []
components:
  parameters:
    x_cf_signature:
      description: Send the signature if IP is not whitelisted.
      name: x-cf-signature
      in: header
      required: false
      schema:
        type: string
      example: ''
  responses:
    AadhaarMaskingResponse:
      description: Success response for masking aadhaar number
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AadhaarMaskingResponseSchema'
          examples:
            VALID:
              value:
                image_link: https://image.url.link
                reference_id: 354768
                verification_id: testverificationid
                status: VALID
            INVALID:
              value:
                status: INVALID_DOCUMENT
                reference_id: 354768
                verification_id: testverificationid
    Response400AadhaarMaskingresponse:
      description: Bad request for Aadhaar Masking API
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/x-client-id_missing'
          examples:
            X-ClientId-Missing:
              $ref: '#/components/examples/XClientIdMissing'
            Image-missing-in-the-request:
              $ref: '#/components/examples/ImageMissingInRequest'
            Invalid-Verification-ID:
              $ref: '#/components/examples/InvalidVerificationId'
            Using-Test-Credentials-in-Prod:
              $ref: '#/components/examples/UsingTestCredentialsInProd'
    Response401:
      description: Invalid client ID and client secret combination
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Invalid client ID and client secret combination:
              value:
                type: authentication_error
                code: authentication_failed
                message: Invalid clientId and clientSecret combination
    Response403:
      description: Authentication error (IP not whitelisted)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            IP not whitelisted:
              value:
                type: authentication_error
                code: ip_validation_failed
                message: >-
                  IP not whitelisted your current ip is 106.51.91.104.For IP
                  whitelisting assistance, visit our guide at
                  https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification
    Response409DuplicateId:
      description: Conflict error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Conflict Error:
              value:
                type: validation_error
                code: verification_id_already_exists
                message: verification ID already exists
    Response413:
      description: File size exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            File size exceeded:
              value:
                type: validation_error
                code: file_size_exceeded
                message: file size exceeded
    Response422:
      description: Validation error because of insufficient balance to process this request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Insufficient balance:
              value:
                type: validation_error
                code: insufficient_balance
                message: Insufficient balance to process this request
    Response429:
      description: Rate limit exceed error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Rate limit error per operation:
              value:
                type: rate_limit_error
                code: too_many_requests_per_operation
                message: Too many requests for this operation, rate limit reached
            Rate limit error per IP:
              value:
                type: rate_limit_error
                code: too_many_requests_per_ip
                message: Too many requests from the IP, rate limit reached
    Response500V2:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: something went wrong
  schemas:
    AadhaarMaskingResponseSchema:
      type: object
      example:
        value:
          status: VALID
          reference_id: 35476
          verification_id: testverificationid
          image_link: https://image.url.here
      properties:
        status:
          type: string
          description: It displays the status of the aadhaar information.
          example: VALID
        reference_id:
          type: integer
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purposes.

            format: `int64`
          example: 35476
        verification_id:
          type: string
          description: >-
            It displays the unique ID you created to identify the verification
            request
          example: testverificationid
        image_link:
          type: string
          description: It displays the URL of the image.
          example: https://image.url.here
    x-client-id_missing:
      description: 400 response schema for missing x-client-id
      type: object
      example:
        type: validation_error
        code: x-client-id missing
        message: x-client-id is missing in the request.
      properties:
        type:
          type: string
          example: validation_error
        code:
          type: string
          example: x-client-id missing
        message:
          type: string
          example: x-client-id is missing in the request.
    ErrorResponseSchema:
      type: object
      properties:
        code:
          type: string
          example: x-client-id_missing
        error:
          type: object
          example:
            ref_id: 102
        message:
          type: string
          example: x-client-id is missing in the request.
          description: It displays the outcome of the error.
        type:
          type: string
          example: validation_error
          description: It displays the type of error.
  examples:
    XClientIdMissing:
      value:
        type: validation_error
        code: x-client-id_missing
        message: x-client-id is missing in the request.
    ImageMissingInRequest:
      value:
        type: validation_error
        code: image_missing
        message: image is missing in the request
    InvalidVerificationId:
      value:
        type: validation_error
        code: verification_id_value_invalid
        message: verification_id can include only alphanum, dot, hyphen and underscores
    UsingTestCredentialsInProd:
      value:
        type: validation_error
        code: x-client-secret_value_invalid
        message: Client secret belongs to test environment
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client ID. You can find your ID in the [Merchant
        Dashboard](https://telr.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://telr.cashfree.com/verificationsuite/developers/api-keys).

````