# Face Match API (💲)

This API is used to verify a user who has already undergone KYC verification. It verifies the user's identity by comparing their face with the previously submitted documents, eliminating the need for the user to undergo KYC onboarding again. If the user is already verified, the API will prevent them from undergoing the verification process again.

{% hint style="info" %}
Method: POST

Authorization: Bearer Token

Parameter:

selfie  (Image File) (\*Mandatory)
{% endhint %}

<figure><img src="https://2740493135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa8ZQwB8n4moII834UHCv%2Fuploads%2FoV9gnItBbB8GVX0Cmzdo%2Fimage.png?alt=media&#x26;token=a840b044-e036-4387-bb95-6a1fbbc916f4" alt=""><figcaption></figcaption></figure>

<mark style="color:green;">`POST`</mark> `http://sdk.faceki.com/api/v3/kyc_verification/search-by-face`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \[token]     |
| Content-Type<mark style="color:red;">\*</mark>  | String | multipart/form-data |

#### Request Body

| Name                                     | Type  | Description                |
| ---------------------------------------- | ----- | -------------------------- |
| selfie<mark style="color:red;">\*</mark> | Image | <p>Upload image</p><p></p> |

{% tabs %}
{% tab title="200: OK " %}

```
{
    "status": true,
    "code": 200,
    "message": "OK",
    "appVersion": "v3.0.0",
    "result": [
        {
            "link": "unique-val",
            "record_identifier": "unique-val",
            "requestId": "XXXXX-ffa0-XCXXXX-9dfc-XXXXXXXXX",
            "document_data": [
                {
                    "reference": "XXXXXXXXX",
                    "full_name": "XXXXXX XXXX XXXXXX",
                    "first_name": "XXXXX XXXXX",
                    "local_name": "ا",
                    "last_name": "XXXXXXXX",
                    "middle_name": "",
                    "nationality": "XXXXXX",
                    "nationality_iso": "XX",
                    "nationality_iso2": "XXX",
                    "issuer": "Bahrain",
                    "issuer_iso": "BH",
                    "issuer_iso2": "BHR",
                    "gender": "M",
                    "dob": "03",
                    "age": "26",
                    "expiry": "XXXX-XX-30",
                    "expiryDay": "30",
                    "expiryMonth": "XX",
                    "expiryYear": "XXXX",
                    "issued": "",
                    "issuedDay": "",
                    "issuedMonth": "",
                    "issuedYear": "",
                    "documentAdditionalNumber": "",
                    "document_number": "XXXXXXXXX",
                    "document_type": "I",
                    "document_type_full": "Identity Card",
                    "mrz": "IDBHRXXXXXXXXX5<<<<<<<<<<<<<<<^97XXXXXX0530XXXX<<<<<<<<<<4^XXXXXER<<XXXXD<HXXXXX<<<<<<<",
                    "document_face_match": {
                        "similarity": 99.98751831054688,
                        "confidence": 99.99876403808594
                    },
                    "passed": true,
                    "date_of_birth": "XX-03-XX",
                    "date_of_birth_day": "XX",
                    "date_of_birth_month": "03",
                    "date_of_birth_year": "XX"
                }
            ],
            "selfie_data": {
                "liveness_pass": true
            },
            "warnings": [],
            "notes": [],
            "aml": [],
            "verification_summary": {
                "face_verified": true,
                "selfie_liveness_verified": true,
                "document_verified": true,
                "verification_rules_passed": true,
                "document_liveness_verified": true,
                "image_quality": true
            },
            "document_data_confidence": [
                {
                    "reference": "XXXXXXXXX",
                    "full_name": 0.9,
                    "first_name": 0,
                    "local_name": 0.9,
                    "last_name": 0,
                    "middle_name": 0,
                    "nationality": 0.97,
                    "nationality_iso": 0.97,
                    "nationality_iso2": 0.97,
                    "issuer": 0,
                    "issuer_iso": 0,
                    "issuer_iso2": 0,
                    "gender": 0.99,
                    "dob": 0.9,
                    "age": 0,
                    "expiry": 1,
                    "expiryDay": 1,
                    "expiryMonth": 1,
                    "expiryYear": 1,
                    "issued": 0,
                    "issuedDay": 0,
                    "issuedMonth": 0,
                    "issuedYear": 0,
                    "documentAdditionalNumber": 0,
                    "placeOfBirth": 0,
                    "document_number": 1,
                    "personal_number": 0,
                    "document_type": 0.8977721333503723,
                    "document_type_full": 0.8977721333503723,
                    "mrz": 0.44,
                    "date_of_birth": 0.9,
                    "date_of_birth_day": 0.9,
                    "date_of_birth_month": 0.9,
                    "date_of_birth_year": 0.9
                }
            ],
            "decision": "DECLINED",
            "errorCodes": [],
            "deviceDetails": {
                "useragent": "PostmanRuntime/7.36.1",
                "detectResult": {
                    "client": {
                        "type": "library",
                        "name": "Postman Desktop",
                        "version": "7.36.1"
                    },
                    "device": {
                        "id": "",
                        "type": "",
                        "brand": "",
                        "model": ""
                    }
                }
            },
            "createdAt": "2024-01-22T21:17:41.556Z",
            "updatedAt": "2024-01-22T21:18:09.137Z",
            "__v": 0,
            "images": [
                {
                    "documentName": "ID_Card",
                    "side": "cropped_signature",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                },
                {
                    "documentName": "ID_Card",
                    "side": "cropped_portrait",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                },
                {
                    "documentName": "ID_Card",
                    "side": "cropped_front",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                },
                {
                    "documentName": "ID_Card",
                    "side": "front",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                },
                {
                    "documentName": "ID_Card",
                    "side": "back",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                },
                {
                    "documentName": "ID_Card",
                    "side": "cropped_back",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                },
                {
                    "documentName": "Selfie",
                    "side": "Selfie",
                    "key": "https://prodstorage.faceki.com/XXXXXXXXXXXXXXXX"
                }
            ],
            "face_id": "XXXXXXXXXXX-4f27-4744-XXXXX-7XXXXXXXXXXX3",
            "updateBy": "XXXXXXXXXXXXXXXXX"
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}
Kindly check the Token is not expired, find more about the token [here](https://docs.faceki.com/api-integration/verification-apis/authentication)
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.faceki.com/api-integration/verification-apis/face-match-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
