# SDK Settings

<mark style="color:green;">`POST`</mark> `{{baseurl}}/v2/sdk/identity/liveness/settings`

#### Headers

| Name                                    | Type   | Description      |
| --------------------------------------- | ------ | ---------------- |
| token<mark style="color:red;">\*</mark> | String | API secret token |

#### Request Body

| Field            | Type    | Description                                                                                                                                                                                                                                                                                                                      |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| threshold        | String  | <p>The security threshold for liveness detection (default is "low").</p><p>Default value: <mark style="color:red;"><code>low</code></mark></p><p>Allowed values: <mark style="color:red;"><code>"low"</code></mark>, <mark style="color:red;"><code>"mid"</code></mark>, <mark style="color:red;"><code>"high"</code></mark></p> |
| actions          | Array   | <p>Array of liveness actions, like faceRotation, openMouth, zoom, blink, passive, motion and yesOrNo.</p><p>Default value: <mark style="color:red;"><code>\["faceRotation"]</code></mark></p>                                                                                                                                    |
| randomizeActions | Boolean | <p>Whether to randomize the actions during the session (default is false).</p><p>Default value: <mark style="color:red;"><code>false</code></mark></p>                                                                                                                                                                           |
| numberofActions  | Number  | <p>Number of actions to be performed in the session (default is 1).</p><p>Default value: <mark style="color:red;"><code>1</code></mark></p>                                                                                                                                                                                      |
| actionsDuration  | Object  | <p>Object specifying duration for each action in seconds.</p><p>Default value: <mark style="color:red;"><code>null</code></mark></p>                                                                                                                                                                                             |
| faceRotation     | Number  | Duration of the "faceRotation" action in seconds.                                                                                                                                                                                                                                                                                |
| openMouth        | Number  | Duration of the "openMouth" action in seconds.                                                                                                                                                                                                                                                                                   |
| zoom             | Number  | Duration of the "zoom" action in seconds.                                                                                                                                                                                                                                                                                        |
| blink            | Number  | Duration of the "blink" action in seconds.                                                                                                                                                                                                                                                                                       |
| yesOrNo          | Number  | Duration of the "yesOrNo" action in seconds.                                                                                                                                                                                                                                                                                     |
| motion           | Number  | Duration of the "motion" action in seconds.                                                                                                                                                                                                                                                                                      |
| passive          | Number  | Duration of the "passive" action in seconds.                                                                                                                                                                                                                                                                                     |

{% tabs %}
{% tab title="SDK Settings Request" %}

```json
{
    "threshold": "mid",
    "actions": [
        "faceRotation",
        "openMouth",
        "blink"
    ],
    "randomizeActions": true,
    "numberofActions": 3,
    "actionsDuration": {
        "faceRotation": 5,
        "openMouth": 3,
        "blink": 2
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Found Response:" %}

```json
{
    "success": true,
    "statusCode": 200,
    "message": "liveness settings updated successfully!",
    "data": {
        "threshold": "high",
        "actions": [
            "faceRotation",
            "openMouth",
            "blink"
        ],
        "randomizeActions": true,
        "numberofActions": 3,
        "actionsDuration": {
            "faceRotation": 5,
            "openMouth": 3,
            "zoom": 0,
            "blink": 2
        },
        "businessId": "62b2e8b281442b03187f7896",
        "createdAt": "2024-09-09T08:24:35.285Z",
        "lastModifiedAt": "2024-09-09T13:08:26.490Z",
        "_createdAt": "2024-09-09T09:24:3535+01:00",
        "_lastModifiedAt": "2024-09-09T14:08:2626+01:00",
        "id": "66deb0c395f3cd56ddfe6a17"
    },
    "links": []
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error Responses:" %}

```json
{
  "success": false,
  "statusCode": 404,
  "message": "You have attempted to get a resource that does not exist.",
  "name": "ResourceNotFoundError",
  "data": {}
}
```

{% endtab %}
{% endtabs %}
