---
title: Verify Aadhaar API
slug: v2-apis/verify-aadhaar-api
description: Learn how to use the Aadhaar verification API to validate Aadhaar numbers against government and trusted ledgers. This API provides a true/false response and additional information like age band, state, mobile number, and gender. Follow the step-by-step g
createdAt: 2022-09-22T13:47:25.000Z
---

## Introduction

The Aadhaar verification API takes aadhaar number an input then the data is checked against **government** and other **trusted ledgers** for correctness. After verification API then returns with **true/false**  indicating the input aadhaar is correct or not along with following other informations:

- Age Band
- State
- Mobile Number
- Gender

## How to call the API

Before going for Verify Aadhaar, you first need to create an Identity object. Then the verification step should be executed once the data has been **validated** for correctness.&#x20;

## API Input Guidelines

- Aadhaar number

## 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\": \" \",\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": "Preproduction"
      },
      {
        "id": "61PFvXrJgKJ3yh2VgwFZN",
        "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": "61PFvXrJgKJ3yh2VgwFZN"
  },
  "description": "Creating Identity card object",
  "currentNewParameter": {
    "label": "Form Parameter",
    "value": "formDataParameters"
  }
}
```
:::

### 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": "verifyAadhaar - To Verify Aadhaar number whether valid or not "
      },
      {
        "kind": "required",
        "name": "essentials.uid",
        "type": "Number",
        "children": [],
        "description": "Aadhaar number to be verify"
      }
    ],
    "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\": \"verifyAadhaar\",\n    \"essentials\": {\n        \"uid\": \"<Aadhaar number>\"\n    }\n}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "hoEu0T1nmZ_-16Bg__SH8",
        "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\": \"verifyAadhaar\",\r\n    \"essentials\": {\r\n        \"uid\": \"<Aadhaar number>\"\r\n    }\r\n}'",
        "language": "curl",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "hoEu0T1nmZ_-16Bg__SH8"
  },
  "description": "Performing autoRecognition & verification",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  }
}
```
:::

### 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.id                  | String        |                                                                                      |
| response.result.verified     | Boolean       | This returns whether the request aadhaar number is true or false                     |
| response.result.ageBand      | String        | For ex. 20-30 denotes that age of the request aadhaar holder is in between that band |
| response.result.state        | String        | State of the Aadhaar holder                                                          |
| response.result.mobileNumber |               | Mobile number of the Aadhaar holder                                                  |
| response.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](#).
:::

