> For the complete documentation index, see [llms.txt](https://api2-ekycapis.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api2-ekycapis.innov8tif.com/okayface/okayface-all/face-search-deprecated/face-insert.md).

# Face Insert

## API Method

## 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<mark style="color:red;">\*</mark>    | string | To be assigned by Innov8tif              |
| imageBase64                                 | string | Selfie Image or Portrait Image in base64 |
| imageFile<mark style="color:red;">\*</mark> | string | Selfie Image or Portrait Image           |
| groupName<mark style="color:red;">\*</mark> | string | Group that exists in the database        |
| userName<mark style="color:red;">\*</mark>  | string | The person's name of the facial image    |

{% tabs %}
{% tab title="200 " %}
**When face is detected in the submitted image file:**

{% code title="Request Code Block" %}

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

{% endcode %}

**When there is no face detected in the submitted image file:**

{% code title="Response Code Block" %}

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

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
