# mentalCommandActionSensitivity

This method get or set the sensitivity of the 4 active mental command actions.

Check out the usage in our [BCI](https://emotiv.gitbook.io/emotivbci/mental-commands/adjusting-sensitivity) app.

## Parameters

| Name        | Type                 | Required | Description                                                                                                                                        |
| ----------- | -------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| cortexToken | `string`             | yes      | A token returned by [authorize](../authentication/authorize).                                                                                      |
| status      | `string`             | yes      | Must be "get" or "set".                                                                                                                            |
| profile     | `string`             | no       | A profile name.                                                                                                                                    |
| session     | `string`             | no       | A session id returned by [createSession](../session/createsession).                                                                                |
| values      | `array of 4 numbers` | no       | If the status is "set", this parameters is the new sensitivities. Each value must be between 1 and 10. Bigger number indicates higher sensitivity. |

You must set one of these 2 parameters: **profile** or **session**. [Read this](..#profile-name-or-session-id) for details.

The array **values** contains the sensitivity of each active actions. The order of the values must follow the order of the active actions, as returned by [mentalCommandActiveAction](mentalcommandactiveaction).

## Result

If the status is "get", then the result is an `array of 4 numbers.`   \
If the status is "set", then the result is a success message.

## Examples

### Get

{% tabs %}
{% tab title="Request" %}
```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "mentalCommandActionSensitivity",
    "params": {
        "cortexToken": "xxx",
        "profile": "cortex-v2-example",
        "status": "get"
    }
}
```
{% endtab %}

{% tab title="Response" %}
```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [5,5,5,5]
}
```
{% endtab %}
{% endtabs %}

### Set

{% tabs %}
{% tab title="Request" %}
```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "mentalCommandActionSensitivity",
    "params": {
        "cortexToken": "xxx",
        "session": "1d5d3655-d570-4731-9faf-967bc5440dc5",
        "status": "set",
        "values": [5,7,5,5]
    }
}
```
{% endtab %}

{% tab title="Response" %}
```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": "success"
}
```
{% endtab %}
{% endtabs %}
