> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/api-reference/check-types/enhanced-identity-check.md).

# Enhanced Identity Check

Enhanced Identity Check API for KYC with document verification, live video, face matching, active liveness, and fraud checks.

## Run an enhanced identity check

To run an Enhanced Identity Check, you must [create a check ](/documentation/api-reference/core-resources/checks/create-a-check.md)with `type` set to `enhanced_identity_check`.

This check can only be performed on a [client](/documentation/api-reference/core-resources/clients.md) of type `person`.

The `documentId` provided must have associated image attachments that adhere to our [image specifications](/documentation/api-reference/check-types/document-check.md#image-specifications).

[Learn more about Enhanced Identity Checks](/documentation/product-guides/biometric-and-liveness-verification/enhanced-identity-check.md).

{% hint style="info" %}
We will use the **front side** of the document for the Enhanced Identity Check.
{% endhint %}

## Check request

<table><thead><tr><th width="295.4">Attribute</th><th width="109">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>clientId</code></td><td>string</td><td>The ID of the client associated with this check. (<strong>Required</strong>)</td></tr><tr><td><code>type</code></td><td>string</td><td>This must be set to <code>enhanced_identity_check</code>. (<strong>Required</strong>)</td></tr><tr><td><code>documentId</code></td><td>string</td><td>The ID of the document. (<strong>Required</strong>)</td></tr><tr><td><code>liveVideoId</code></td><td>string</td><td>The ID of the live video. (<strong>Required</strong>)</td></tr></tbody></table>

## Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.complycube.com/v1/checks \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "clientId":"CLIENT_ID",
          "liveVideoId":"LIVE_VIDEO_ID",
          "documentId":"DOCUMENT_ID",
          "type": "enhanced_identity_check"
        }'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const check = await complycube.check.create("CLIENT_ID", {
        liveVideoId: "LIVE_VIDEO_ID",
        documentId: "DOCUMENT_ID",
        type: "enhanced_identity_check"
});
```

{% endtab %}

{% tab title="Python" %}

```python
check = cc_api.check.create(
    'CLIENT_ID',
    'enhanced_identity_check',
    liveVideoId='LIVE_VIDEO_ID',
    documentId='DOCUMENT_ID'
)
```

{% endtab %}

{% tab title="PHP" %}

```php
$result = $ccapi->checks()->create(
    'CLIENT_ID',
    [
        'type' => 'enhanced_identity_check',
        'liveVideoId' => 'LIVE_VIDEO_ID',
        'documentId' => 'DOCUMENT_ID'
    ]
);
```

{% endtab %}

{% tab title=".NET" %}

```csharp
var checkRequest = new CheckRequest {
  clientId = "CLIENT_ID",
  documentId = "DOCUMENT_ID",
  liveVideoId = "LIVE_VIDEO_ID",
  type = "enhanced_identity_check"
};

var check = await checkApi.CreateAsync(checkRequest);
```

{% endtab %}
{% endtabs %}

## Result object

The `result` object is only returned when the status of the check is `complete` . It has two components - `outcome` and `breakdown`.

### Outcome

The outcome attribute represents the overall check result. Returned values include:

1. `clear`: Indicates every analysis conducted returned a successful result, and hence the identity is authentic.
2. `attention`: Indicates at least one of the analysis results requires attention.

### Breakdown

The breakdown comprises the following objects:

#### `faceAnalysis` object

The facial analysis results. It has the following constituents:

* `facialSimilarity`: Indicates whether the faces on the live video and document belong to the same person.
* `previouslyEnrolledFace`: Indicates whether the face on the live photo has been previously enrolled as a different client.
* `breakdown`: Breakdown related to facial analysis.
  * `facialSimilarityScore`: Indicates the similarity level of whether two faces belong to the same person. The score will be 1 for a perfect match.
  * `enrolledFacesMatches`: If a face is deemed to have been enrolled previously, this will contain an array of objects that contain the following:
    * `clientId`: The unique identifier for the matching client.
    * `entityName`: The client's full name.
    * `livePhotoId`: The unique identifier for the matching live photo.
    * `liveVideoId`: The unique identifier for the matching live video. Either a **liveVideoId** or **livePhotoId** will exist in the object, not both.
    * `facialSimilarityScore`: The similarity level of the client's face against the live photo associated with the check.

#### `authenticityAnalysis` object

The facial analysis results. It has the following constituents:

* `spoofedImageAnalysis`: Indicates whether the images are spoofed, copied from the internet, or are known blacklisted images.
* `livenessVoiceChallengeAnalysis`: Indicates if the client had recited the correct text during the **voice** challenge.
* `livenessActionChallengeAnalysis`: Indicates if the client had performed the correct movements during the **actions** challenge.
* `breakdown`: Breakdown related to authenticity analysis.
  * `specimenCheckMatches`: If an image is deemed copied from the internet, this will contain an array of URLs pointing to the image.
  * `livenessCheckScore`: Indicates the liveness score of the live photo. The score will be 100 when it is assumed to be authentic.

#### `integrityAnalysis` object

The integrity analysis results. It has the following constituents:

* `faceDetection`: Indicates whether the images contained the expected number of faces.
* `vpnDetected`: Indicates whether the client was using a Virtual Private Network (VPN) when conducting the check.

## Sample Response

```javascript
{
   "id": "5e94b88a01bce00008c86f01",
   "entityName": "John Doe",
   "type": "enhanced_identity_check",
   "clientId": "5e94b75d01bce00008c86f02",
   "documentId": "5e94b87b01bce00008c86f03",
   "liveVideoId": "5e94b88901bce00008c86f0a",
   "status": "complete",
   "result": {
      "outcome": "clear",
      "breakdown": {
         "faceAnalysis": {
            "facialSimilarity": "clear",
            "previouslyEnrolledFace": "clear",
            "breakdown": {
               "facialSimilarityScore": 100
            }
         },
         "authenticityAnalysis": {
            "spoofedImageAnalysis": "clear",
            "livenessCheck": "clear",
            "livenessVoiceChallengeAnalysis": "clear",
            "livenessActionChallengeAnalysis": "clear",
            "breakdown": {
               "livenessCheckScore": 100
            }
         },
         "integrityAnalysis": {
            "faceDetection": "clear",
            "vpnDetected": "clear"
         }
      }
   },
   "createdAt": "2020-01-04T17:25:21.116Z",
   "updatedAt": "2020-01-04T17:25:21.116Z"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.complycube.com/documentation/api-reference/check-types/enhanced-identity-check.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
