# configMapping

The **configMapping** API manages **EEG** **channel mapping configurations** for a **EPOC Flex** headset. This API allows you to **create**, **get**, **read**, **update and delete** mapping configurations.

To connect to an EPOC Flex headset, you must input a specific EEG channel mapping or the name of an existing mapping for the current Emotiv user.

## **Parameters**

| Name        | Type     | Required | Description                                                                                                                                                                                        |
| ----------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cortexToken | `string` | Yes      | A valid Cortex token from a successful authentication.                                                                                                                                             |
| status      | `string` | Yes      | Action to perform: `create`, `get`, `read`, `update`, or `delete`.                                                                                                                                 |
| uuid        | `string` | No       | Unique ID of a mapping configuration (required for  `read`, `delete`).                                                                                                                             |
| name        | `string` | No       | Name of the configuration (required for `create` ).                                                                                                                                                |
| mappings    | `object` | No       | Key-value pairs define EEG sensor mapping (required for `create`; optional for `update`). More details are available [here](https://emotiv.gitbook.io/cortex-api/controldevice#epoc-flex-mapping). |

### **Status create**

Create a new sensor mapping for EPOC Flex. The configuration will be added to list EEG sensor mapping configuration of current emotiv user, can be synced to other machine.\
**Requires**: `cortexToken`, `status="create"`, `name`, and `mappings`.

**Example**

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

```javascript
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "configMapping",
    "params": {
      "cortexToken": "xxx",
      "mappings": {
        "CMS": "TP9",
        "DRL": "TP10",
        "RD": "T8",
        "RE": "F4",
        "RF": "F8",
        "RG": "AF4"
      },
      "name": "config1",
      "status": "create"
    }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Create flex mapping config successful",
    "value": {
      "label": {},
      "mappings": {
        "CMS": "TP9",
        "DRL": "TP10",
        "RD": "T8",
        "RE": "F4",
        "RF": "F8",
        "RG": "AF4"
      },
      "name": "config1",
      "uuid": "4416dc1b-3a7c-4d20-9ec6-aacdb9930071"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### **Status get**

Retrieve all mapping configurations for the current Emotiv user.\
**Requires**: `cortexToken`, `status="get"`.

**Example**

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

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "get"
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Get flex mapping config successful",
    "value": {
      "config": [
        {
          "label": {},
          "mappings": {
            "CMS": "TP10",
            "DRL": "TP9",
            "LA" : "C3",
            "LB" : "T7",
          },
          "name": "Default Configuration",
          "uuid": "f4296b2d-d6e7-45cf-9569-7bc2a1bd56e4"
        },
        {
          "label": {},
          "mappings": {
            "CMS": "TP9",
            "DRL": "TP10",
            "RF" : "F8",
            "RG" : "AF4"
          },
          "name": "config2",
          "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
        }
      ],
      "updated": "2025-10-08T06:16:30.521+07:00",
      "version": "2018-05-08"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### **Status read**

Read the details of a specific configuration.\
**Requires**: `cortexToken`, `status="read"`, `uuid`.

**Example**

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

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "read",
    "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Read flex mapping config successful",
    "value": {
      "label": {},
      "mappings": {
        "CMS": "TP9",
        "DRL": "TP10",
        "RF" : "F8",
        "RG" : "AF4"
      },
      "name": "config2",
      "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### **Status update**

To update an existing mapping configuration.\
**Requires**: `cortexToken`, `status`, and `uuid`.&#x20;

The `name` and `mappings` are optional parameters:

* If `name` is included, the configuration name will be updated.
* If `mappings` is included, the mappings will be updated.
* If both are included, both fields will be updated.

**Example**

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

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "update",
    "uuid": "764adb97-a710-4d95-977a-dea5b682aa04",
    "name": "new config"
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Update flex mapping config successful",
    "value": {
      "label": {},
      "mappings": {
        "CMS": "TP9",
        "DRL": "TP10",
        "RF" : "F8",
        "RG" : "AF4"
      },
      "name": "new config",
      "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### **Status delete**

Delete a mapping configuration.\
Requires: `cortexToken`, `status="delete"`, `uuid`.

**Example**

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

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "delete",
    "uuid": "effa621f-49d6-4c46-95f3-28f43813a6e9"
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "id": 3373617,
  "jsonrpc": "2.0",
  "result": {
    "message": "Delete flex mapping config successful",
    "uuid": "effa621f-49d6-4c46-95f3-28f43813a6e9"
  }
}
```

{% endtab %}
{% endtabs %}
