# 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 %}
