---
title: Basic Verify Aadhaar API
slug: v2/basic-verify-aadhaar-api
description: Learn how to use the Basic Aadhaar verification API to authenticate Aadhaar numbers by cross-checking with trusted government ledgers. This document includes step-by-step instructions to create an Identity object, code examples for interacting with the Id
createdAt: 2022-09-22T20:43:32.000Z
---

## Introduction

The Basic Aadhaar verification API takes aadhaar number an input then the data is checked against **government** and other **trusted ledgers** for correctness. A After proper verification API just returns with **true/false** indicating that either input aadhaar is correct or not.

## 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\": \"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\": \"<email Id>\",\n    \"callbackUrl\": \"https://www.w3schools.com\",\n    \"images\": [<images Url>]\n}'\n\n",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "ZvF9SuvsfmHDeGKCQyza5",
        "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}'\r\n",
        "language": "curl",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "kfRv8Bc-HCVeTxcsuYGnt"
  },
  "description": "Creating Identity object",
  "currentNewParameter": {
    "label": "Form Parameter",
    "value": "formDataParameters"
  },
  "autoGeneratedAnchorSlug": "identity-request",
  "legacyHash": "C9WHh5NDZEjh0t7vUq7ik"
}
```
:::

### 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/jso"
      }
    ],
    "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\": \" \",\n    \"task\": \"basicVerifyAadhaar\",\n    \"essentials\": {\n        \"uid\": \" \"\n    },\n    \"accessToken\": \" \",\n    \"id\": \" \",\n    \"response\": {\n        \"url\": {},\n        \"id\": \" \",\n        \"result\": {\n            \"verified\": true,\n            \"aadhaarNumber\": \" \"\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": "-U24bEHkbnTV-_670XFhH",
        "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": "none",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "-U24bEHkbnTV-_670XFhH"
  },
  "description": "Performing autoRecognition & verification",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "snoop-request",
  "legacyHash": "ieV9Lb36uHBh2pMfBjhty"
}
```
:::

### 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  |



:::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](#).
:::

