---
title: Verify Aadhaar Async API
slug: v2/verify-aadhaar-async-api
description: Learn how to efficiently verify Aadhaar numbers using asynchronous APIs with this comprehensive document. Discover guidelines, code examples, and detailed explanations of the parameters and responses for the Identity and Snoop APIs involved in the verific
createdAt: 2022-09-22T13:47:25.000Z
---

## Introduction

Async is used where there is a time lag or time dependency is more than usual.&#x20;
In the case of asynchronous APIs, the availability of a resource, service or data store may not be immediate. These APIs may provide a callback to the requester when the requested resource is ready.&#x20;

Asynchronous requests are useful in maintaining functionality in an application rather than tie up application resources waiting on a request.

### How to call the API

Before going for Verify Aadhaar, you first need to create an Identity object.&#x20;

### API Input Guidelines

- Aadhaar number
- Callback URL

### Step 1: Hit Identities API

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://preproduction.signzy.tech/api/v2/patrons/<Patron ID>/identities",
  "name": "Identity Request",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "children": [],
        "description": "Contains the id parameter returned from the login step"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "children": [],
        "description": "Application/JSON"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "children": [],
        "description": "type of document"
      },
      {
        "kind": "required",
        "name": "email",
        "type": "string",
        "children": [],
        "description": "mail Id of person"
      },
      {
        "kind": "required",
        "name": "callbackUrl",
        "type": "string",
        "children": [],
        "description": "URL where response will be posted"
      },
      {
        "kind": "required",
        "name": "images",
        "type": "Array",
        "children": [],
        "description": "URL of the image to be masked"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "b8A71Ch8FpbUHqoxk__1W",
        "code": "{\n    \"type\": \"aadhaar\",\n    \"email\": \"ankur.rand@signzy.com\",\n    \"callbackUrl\": \"https://www.w3schools.com\",\n    \"images\": [],\n    \"accessToken\": \"<Access Token>\",\n    \"autoRecognition\": [],\n    \"verification\": [],\n    \"forgeryCheck\": [],\n    \"id\": \"<ID>\",\n    \"patronId\": \"<Patron ID>\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "b8A71Ch8FpbUHqoxk__1W"
  },
  "examples": {
    "languages": [
      {
        "id": "kfRv8Bc-HCVeTxcsuYGnt",
        "code": "curl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/<Patron ID>/identities' \\\r\n--header 'Authorization: <Auth Key>' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"type\": \"aadhaar\",\r\n    \"email\": \"<email Id>\",\r\n    \"callbackUrl\": \"https://www.w3schools.com\",\r\n    \"images\": [<images Url>]\r\n}'",
        "language": "curl",
        "customLabel": ""
      },
      {
        "id": "RUK3hWX6-dzMEkqKBYlC9",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/patrons/<Patron ID>/identities' \\\r\n--header 'Authorization: <Auth Key>' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"type\": \"aadhaar\",\r\n    \"email\": \"<email Id> \",\r\n    \"callbackUrl\": \"https://www.w3schools.com\",\r\n    \"images\": [<images Url>]\r\n}'",
        "language": "curl",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "kfRv8Bc-HCVeTxcsuYGnt"
  },
  "description": "Creating Identity card object",
  "currentNewParameter": {
    "label": "Form Parameter",
    "value": "formDataParameters"
  },
  "autoGeneratedAnchorSlug": "identity-request",
  "legacyHash": "I9bxX-R0u4RGVNaJQulij"
}
```
:::

### Identity Response Parameters

| **Parameters Name** | **Data Type** | **Description**                                                    |
| ------------------- | ------------- | ------------------------------------------------------------------ |
| type                | String        | type of document                                                   |
| email               | String        | mail Id of person                                                  |
| callbackUrl         | String        | URL where response will be posted                                  |
| images              | Array         | It is the url of images                                            |
| accessToken         | String        | Contains the access token that was received from identity request  |
| autoRecognition     | String        | autorecognition                                                    |
| verification        | String        | It verifies                                                        |
| forgeryCheck        | String        | It checks for forgery occurances                                   |
| id                  | String        | Contains the Identity object id                                    |
| patronId            | String        | Unique user ID                                                     |



### Step 2: Hit Snoops API and receive a Request ID

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://preproduction.signzy.tech/api/v2/snoops",
  "name": "Snoop request",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "children": [],
        "description": "application/json"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "service",
        "type": "string",
        "description": "Type-Identity"
      },
      {
        "kind": "required",
        "name": "itemId",
        "type": "string",
        "children": [],
        "description": "Contains the Identity object id"
      },
      {
        "kind": "required",
        "name": "accessToken",
        "type": "string",
        "children": [],
        "description": "Access token for the identity object"
      },
      {
        "kind": "required",
        "name": "task",
        "type": "string",
        "children": [],
        "description": "verifyAadhaarAsyncId - Get a request ID, using which we can call another API to verify aadhaar "
      },
      {
        "kind": "required",
        "name": "Essentials",
        "type": "Object",
        "children": [
          {
            "kind": "required",
            "name": "uid",
            "type": "string",
            "description": "Aadhaar number"
          },
          {
            "kind": "required",
            "name": "callbackurl",
            "type": "string",
            "description": "URL where response will be posted"
          }
        ],
        "description": "Contains essential input data"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "lUplEMmSwiael_lnPl95r",
        "code": "{\n    \"service\": \"Identity\",\n    \"itemId\": \"<Item ID>\",\n    \"task\": \"verifyAadhaarAsyncId\",\n    \"essentials\": {\n        \"uid\": \"<Aadhaar Number>\",\n        \"callbackUrl\": \"<Call back URL>\"\n    },\n    \"accessToken\": \"<Access Token>\",\n    \"id\": \"<ID>\",\n    \"response\": {\n        \"url\": {},\n        \"id\": \"<ID>\",\n        \"result\": {\n            \"requestId\": \"<Request ID>>\"\n        },\n        \"instance\": {}\n    }\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "lUplEMmSwiael_lnPl95r"
  },
  "examples": {
    "languages": [
      {
        "id": "Ox-uOf5XVL4JRvPiB1ue6",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/snoops' \\\r\n\r\n--header 'Content-Type: application/json;charset=UTF-8' \\\r\n--data-raw '{\r\n    \"service\": \"Identity\",\r\n    \"itemId\": \"<Item ID>\",\r\n    \"accessToken\": \"<Access Token>\",\r\n    \"task\": \"verifyAadhaarAsyncId\",\r\n    \"essentials\": {\r\n        \"uid\": \"<Aadhaar Number>\",\r\n        \"callbackUrl\": \"<Call back URL>\"\r\n    }\r\n}'",
        "language": "curl",
        "customLabel": ""
      },
      {
        "id": "1sB2eh0nfgponiIauh7n8",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/snoops' \\\r\n\r\n--header 'Content-Type: application/json;charset=UTF-8' \\\r\n--data-raw '{\r\n    \"service\": \"Identity\",\r\n    \"itemId\": \"<Item ID>\",\r\n    \"accessToken\": \"<Access Token>\",\r\n    \"task\": \"verifyAadhaarAsyncId\",\r\n    \"essentials\": {\r\n        \"uid\": \"<Aadhaar Number>\",\r\n        \"callbackUrl\": \"<Call back URL>\"\r\n    }\r\n}'",
        "language": "none",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "Ox-uOf5XVL4JRvPiB1ue6"
  },
  "description": "Receiving Request ID",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "snoop-request",
  "legacyHash": "ViAX9pxNwMIfh1qBN99k6"
}
```
:::

### Response Parameters

| **Parameters Name**       | **Data Type** | **Description**                                                   |
| ------------------------- | ------------- | ----------------------------------------------------------------- |
| accessToken               | String        | Contains the access token that was received from identity request |
| id                        | String        | Contains the patron Id of the snoop request                       |
| response.url              | String        |                                                                   |
| response.id               | String        |                                                                   |
| response.result.requestId | String        | Request ID received to be used to verify aadhaar                  |

***

## Verifying Aadhaar from the Request ID received

### Step 1: Hit Identities API

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://preproduction.signzy.tech/api/v2/patrons/<Patron ID>/identities",
  "name": "Identity Request",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "children": [],
        "description": "Contains the id parameter returned from the login step"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "children": [],
        "description": "Application/JSON"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "children": [],
        "description": "type of document"
      },
      {
        "kind": "required",
        "name": "email",
        "type": "string",
        "children": [],
        "description": "mail Id of person"
      },
      {
        "kind": "required",
        "name": "callbackUrl",
        "type": "string",
        "children": [],
        "description": "URL where response will be posted"
      },
      {
        "kind": "required",
        "name": "images",
        "type": "Array",
        "children": [],
        "description": "URL of the image to be masked"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "b8A71Ch8FpbUHqoxk__1W",
        "code": "{\n    \"type\": \"aadhaar\",\n    \"email\": \"ankur.rand@signzy.com\",\n    \"callbackUrl\": \"https://www.w3schools.com\",\n    \"images\": [],\n    \"accessToken\": \"<Access Token>\",\n    \"autoRecognition\": [],\n    \"verification\": [],\n    \"forgeryCheck\": [],\n    \"id\": \"<ID>\",\n    \"patronId\": \"<Patron ID>\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "b8A71Ch8FpbUHqoxk__1W"
  },
  "examples": {
    "languages": [
      {
        "id": "kfRv8Bc-HCVeTxcsuYGnt",
        "code": "curl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/<Patron ID>/identities' \\\n--header 'Authorization: <Auth Key>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"type\": \"aadhaar\",\n    \"email\": \"ankur.rand@signzy.com\",\n    \"callbackUrl\": \"https://www.w3schools.com\",\n    \"images\": []\n}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "5dhPzUZz799DS4e6m-fXX",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/patrons/<Patron ID>/identities' \\\r\n--header 'Authorization: <Auth Key>' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"type\": \"aadhaar\",\r\n    \"email\": \"ankur.rand@signzy.com\",\r\n    \"callbackUrl\": \"https://www.w3schools.com\",\r\n    \"images\": []\r\n}'",
        "language": "none",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "kfRv8Bc-HCVeTxcsuYGnt"
  },
  "description": "Creating Identity card object",
  "currentNewParameter": {
    "label": "Form Parameter",
    "value": "formDataParameters"
  },
  "autoGeneratedAnchorSlug": "identity-request-1",
  "legacyHash": "gbaGtaqnf9K4q0KskvfIT"
}
```
:::

### Identity Response Parameters

| **Parameters Name** | **Data Type** | **Description**                                                   |
| ------------------- | ------------- | ----------------------------------------------------------------- |
| type                | String        | type of document                                                  |
| email               | String        | mail Id of person                                                 |
| callbackUrl         | String        | URL where response will be posted                                 |
| images              | Array         | It is the url of images                                           |
| accessToken         | String        | Contains the access token that was received from identity request |
| autoRecognition     | String        | autorecognition                                                   |
| verification        | String        | It verifies                                                       |
| forgeryCheck        | String        | It checks for forgery occurances                                  |
| id                  | String        | Contains the Identity object id                                   |
| patronId            | String        | Unique user ID                                                    |



### Step 2: Hit Snoops API and receives a response

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://preproduction.signzy.tech/api/v2/snoops",
  "name": "Snoop request",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "children": [],
        "description": "application/json"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "service",
        "type": "string",
        "description": "Type-Identity"
      },
      {
        "kind": "required",
        "name": "itemId",
        "type": "string",
        "children": [],
        "description": "Contains the Identity object id"
      },
      {
        "kind": "required",
        "name": "accessToken",
        "type": "string",
        "children": [],
        "description": "Access token for the identity object"
      },
      {
        "kind": "required",
        "name": "task",
        "type": "string",
        "children": [],
        "description": "verifyAadhaarAsyncData - To Verify Aadhaar number whether valid or not using Async request "
      },
      {
        "kind": "required",
        "name": "Essentials",
        "type": "Object",
        "children": [
          {
            "kind": "required",
            "name": "requestId",
            "type": "string",
            "description": "ID requested "
          }
        ],
        "description": "Contains Essential input data"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "lUplEMmSwiael_lnPl95r",
        "code": "{\n    \"service\": \"Identity\",\n    \"itemId\": \"<Item ID>\",\n    \"task\": \"verifyAadhaar\",\n    \"essentials\": {\n        \"uid\": \"<Aadhaar number>\"\n    },\n    \"accessToken\": \"<Access Token>\",\n    \"id\": \"<ID>\",\n    \"response\": {\n        \"url\": {},\n        \"id\": \"<Id>\",\n        \"result\": {\n            \"verified\": \"true\",\n            \"ageBand\": \"20-30\",\n            \"state\": \"Delhi\",\n            \"mobileNumber\": \"xxxxxxx917\",\n            \"gender\": \"MALE\"\n        },\n        \"instance\": {}\n    }\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "lUplEMmSwiael_lnPl95r"
  },
  "examples": {
    "languages": [
      {
        "id": "Ox-uOf5XVL4JRvPiB1ue6",
        "code": "curl --location --request POST 'https://preproduction.signzy.tech/api/v2/snoops' \\\n--header 'Content-Type: application/json;charset=UTF-8' \\\n--data-raw '{\n    \"service\": \"Identity\",\n    \"itemId\": \"<Item ID>\",\n    \"accessToken\": \"<Access Token>\",\n    \"task\": \"verifyAadhaarAsyncData\",\n     \"essentials\": {\n        \"requestId\": \"<Request ID>\"\n    }\n}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "C6hYIsRW1jP1QOaUIFLrA",
        "code": "curl --location --request POST 'https://signzy.tech/api/v2/snoops' \\\r\n--header 'Content-Type: application/json;charset=UTF-8' \\\r\n--data-raw '{\r\n    \"service\": \"Identity\",\r\n    \"itemId\": \"<Item ID>\",\r\n    \"accessToken\": \"<Access Token>\",\r\n    \"task\": \"verifyAadhaarAsyncData\",\r\n     \"essentials\": {\r\n        \"requestId\": \"<Request ID>\"\r\n    }\r\n}'",
        "language": "none",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "C6hYIsRW1jP1QOaUIFLrA"
  },
  "description": "Performing autoRecognition & verification",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "snoop-request-1",
  "legacyHash": "pj9x84xcrRdwsUQ5oHePu"
}
```
:::

### Response Parameters

| **Parameters Name** | **Data Type** | **Description**                                                                      |
| ------------------- | ------------- | ------------------------------------------------------------------------------------ |
| accessToken         | String        | Contains the access token that was received from identity request                    |
| id                  | String        | Contains the patron Id of the snoop request                                          |
| response.url        | String        | URL of the image                                                                     |
| response.id         | String        |                                                                                      |
| result.verified     | Boolean       | This returns whether the request aadhaar number is true or false                     |
| result.ageBand      | String        | For ex. 20-30 denotes that age of the request aadhaar holder is in between that band |
| result.state        | String        | State of the Aadhaar holder                                                          |
| result.mobileNumber |               | Mobile number of the Aadhaar holder                                                  |
| result.gender       | String        | Gender of the Aadhaar holder                                                         |



:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

