# Face Insert

## Insert

<mark style="color:green;">`POST`</mark> `https://okaydocdemo.innov8tif.com/ekyc/api/innov-face/facequery/insert`

This API enables insertion of the facial image to database for query

#### Request Body

| Name        | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| apiKey      | string | To be assigned by Innov8tif              |
| imageBase64 | string | Selfie Image or Portrait Image in base64 |
| imageFile   | string | Selfie Image or Portrait Image           |
| groupName   | string | Group that exists in the database        |
| userName    | string | The person's name of the facial image    |

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

```
{
    "status": "success",
    "groupName": "innov8tiftestnew",
    "groupStatus": "EXISTING",
    "name": "Jin-Xuan"
}
```

{% endtab %}
{% endtabs %}

### Input Example in Postman

![](https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-MjTiv-TFY7YDAq-hLtz%2F-MjTjGbcjUn-SN2ygt6S%2FinsertUntitled.png?alt=media\&token=c0d99610-4f7f-4072-b2e5-08cf4da947a3)

{% hint style="warning" %}
Insert facial image need to fulfill the [image requirement](https://api.innov8tif.com/okayface/image-requirements) for better accuracy
{% endhint %}

### Possible Responses

{% code title="When face is detected in the image and successful detected" %}

```
{
    "status": "success",
    "groupName": "Innov8tif_test_new",
    "groupStatus": "EXISTING",
    "name": "Jin-Xuan" 
}
```

{% endcode %}

{% code title="When no face is detected in image:" %}

```
{
    "status": "error",
    "message": "There is No Face Detected in Image" 
}
```

{% endcode %}


---

# 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://api-old.innov8tif.com/okayface/face-search/face-insert.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.
