# 16. Business API

## Add a new device

<mark style="color:green;">`POST`</mark> `https://smartnest.cz/api/v6/devices`

Add a new device to your Business account.

#### Headers

| Name                                      | Type      | Description                                   |
| ----------------------------------------- | --------- | --------------------------------------------- |
| api-key<mark style="color:red;">\*</mark> | XXXXXXXXX | business API key. to get one contact support. |

#### Request Body

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| name<mark style="color:red;">\*</mark> | device | Device name |
| type<mark style="color:red;">\*</mark> | switch | Device type |

{% tabs %}
{% tab title="401: Unauthorized When API key is not present or wrong" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="200: OK Request was processed" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

###
