---
title: Face Extraction API
slug: v2-apis/4O3W-face-extraction-api
description: Learn how to call the Aadhaar API with this comprehensive document. Discover input requirements, code examples, and a detailed step-by-step process for creating an identity card object. Explore auto recognition and verification techniques, and gain insigh
createdAt: 2022-09-20T22:05:10.000Z
---

## Introduction

Aadhaar is a 12-digit unique identity number that can be obtained voluntarily by residents or passport holders of India, based on their biometric and demographic data. The data is collected by the Unique Identification Authority of India (UIDAI), a statutory authority established in January 2009 by the government of India.

## How to call the API

Before going for Auto reading or Verification calls, you first need to create an Identity object. For best results, please make sure that the image you use fits tightly in camera view and is horizontally aligned. Each image/pdf should be less than 2MB and an expired image should not be uploaded.

## API Input Guidelines

- The Image should be of good quality
- The Image should be less than 2MB in size
- This API accepts only image, pdf, or URLs of image(png/jpg/jpeg/tiff)

## 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": "Authorization token"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "children": [],
        "description": "Application/JSON"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Type of identity"
      },
      {
        "kind": "required",
        "name": "email",
        "type": "string",
        "children": [],
        "description": "e-mail ID"
      },
      {
        "kind": "required",
        "name": "callbackurl",
        "type": "string",
        "children": [],
        "description": "URL where response will be posted"
      },
      {
        "kind": "required",
        "name": "images",
        "type": "Array",
        "children": [],
        "description": "Front and back image of aadhaar"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "AldhBKlzZNUpNGHj-FvO7",
        "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\": \"<PatronID>\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "AldhBKlzZNUpNGHj-FvO7"
  },
  "examples": {
    "languages": [
      {
        "id": "y2f_VZjz30OnY7EU_Y9xV",
        "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}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "fblaW8fGRs_WbPqk5srDs",
        "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": "fblaW8fGRs_WbPqk5srDs"
  },
  "description": "Creating Identity card object",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

### Identity Response Parameters

| **Parameter Name** | **Data Type** | **Description**                         |
| ------------------ | ------------- | --------------------------------------- |
| accessToken        | String        | This is provided by identities API      |
| autoRecognition    | String        | Auto recognises face from aadhaar image |
| verification       | String        | It Verifies<br />It verifies            |
| frogeryCheck       | String        | Forgery check for the image             |
| id                 | String        | Contains the Identity object id         |
| patronId           | String        | Unique ID of the user                   |

***

## 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 of Signzy service - “identity extraction"
      },
      {
        "kind": "required",
        "name": "itemId",
        "type": "string",
        "children": [],
        "description": "Contains the identity item id"
      },
      {
        "kind": "required",
        "name": "task",
        "type": "string",
        "children": [],
        "description": "Task- Face Extraction"
      },
      {
        "kind": "required",
        "name": "essentials",
        "type": "Object",
        "children": [
          {
            "kind": "required",
            "name": "url",
            "type": "string",
            "description": "URL of the aadhaar image from which face to be extracted "
          }
        ],
        "description": "Contains the essential output data"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "DhbJ_vixnOkpCrZqji4t3",
        "code": "{\n    \"service\": \"Identity\",\n    \"itemId\": \"<Item Id>\",\n    \"task\": \"faceExtraction\",\n    \"essentials\": {\n        \"url\": \"<>\"\n    },\n    \"accessToken\": \"<Access Token>\",\n    \"id\": \"<ID>\",\n    \"response\": {\n        \"url\"<URL of  aadhaar image to be cropped >\" ,\n        \"ttl\": \"10 mins\",\n        \"id\": 25,\n        \"result\": {\n            \"cropped\": \"<Image URL of face extracted>\"\n        }\n    }\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "DhbJ_vixnOkpCrZqji4t3"
  },
  "examples": {
    "languages": [
      {
        "id": "IUyd0fXV16FzqwRomPH8e",
        "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\": \"faceExtraction\",\n    \"essentials\": {\n        \"url\": \"<Image URL>\"\n    }\n}'",
        "language": "curl",
        "customLabel": "Preproduction"
      },
      {
        "id": "TvM7m1Hw46fdDVISWVixg",
        "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\": \"faceExtraction\",\r\n    \"essentials\": {\r\n        \"url\": \"<Image URL>\"\r\n    }\r\n}'",
        "language": "curl",
        "customLabel": "Production"
      }
    ],
    "selectedLanguageId": "TvM7m1Hw46fdDVISWVixg"
  },
  "description": "Performing autoRecognition & verification",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

### Response Parameters

| **Parameter Name**      | **Description**                                                                                                                   |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| service                 | Type of Signzy service - “identity extraction”                                                                                    |
| itemId                  | Contains the identity item id                                                                                                     |
| task                    | The type of task performed - “Auto Recognition”                                                                                   |
| essentials              | Contains the essential output data                                                                                                |
| accessToken             | Contains the access token that was received from identity request                                                                 |
| Id                      | Contains the unique Id of the snoop request                                                                                       |
| response.url            | URL of aadhaar image to be cropped                                                                                                |
| response.ttl            | ttl is Time to live Time to live (TTL) is the time that an object is stored in a caching system before it's deleted or refreshed. |
| response.id             | ID of the response                                                                                                                |
| response.result.cropped | URL of Cropped image from aadhaar                                                                                                 |



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

