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


---

# 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://doc.youverify.co/know-your-customer-services-kyc/sdk/sdk-settings.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.
