# Commands

{% hint style="warning" %}
Work In Progress
{% endhint %}

## Backup Reserve

<mark style="color:green;">`POST`</mark> `https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/backup`

#### Path Parameters

| Name      | Type    | Description                                          |
| --------- | ------- | ---------------------------------------------------- |
| :site\_id | integer | The `{energy_site_id}` number from the products list |

#### Headers

| Name          | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| Authorization | string | Bearer `{access_token}` from authentication |

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

```
```

{% endtab %}
{% endtabs %}

## Site Name

<mark style="color:green;">`POST`</mark> `https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/site_name`

Change the user-facing name of the energy site. This value can be read from the **Site Configuration** method.\
The request body is a JSON object.

#### Path Parameters

| Name      | Type    | Description                                          |
| --------- | ------- | ---------------------------------------------------- |
| :site\_id | integer | The `{energy_site_id}` number from the products list |

#### Headers

| Name          | Type   | Description                                             |
| ------------- | ------ | ------------------------------------------------------- |
| Content-Type  | string | `application/json` or `application/json; charset=utf-8` |
| Authorization | string | Bearer `{access_token}` from authentication             |

#### Request Body

| Name       | Type   | Description                                                                   |
| ---------- | ------ | ----------------------------------------------------------------------------- |
| site\_name | string | <p>The new name for the site.<br><code>{ "site\_name": "My Site" }</code></p> |

{% tabs %}
{% tab title="200 The HTTP response code is actually 200, even though the response body contains the number 201." %}

```javascript
{
  "response": {
    "code": 201,
    "message": "Updated"
  }
}
```

{% endtab %}
{% endtabs %}

## Operation Mode

<mark style="color:green;">`POST`</mark> `https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/operation`

#### Path Parameters

| Name      | Type    | Description                                          |
| --------- | ------- | ---------------------------------------------------- |
| :site\_id | integer | The `{energy_site_id}` number from the products list |

#### Headers

| Name          | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| Authorization | string | Bearer `{access_token}` from authentication |

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

```
```

{% endtab %}
{% endtabs %}

## Time Of Use Settings

<mark style="color:green;">`POST`</mark> `https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/time_of_use_settings`

#### Path Parameters

| Name      | Type    | Description                                          |
| --------- | ------- | ---------------------------------------------------- |
| :site\_id | integer | The `{energy_site_id}` number from the products list |

#### Headers

| Name          | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| Authorization | string | Bearer `{access_token}` from authentication |

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

```
```

{% endtab %}
{% endtabs %}

## Storm Mode

<mark style="color:green;">`POST`</mark> `https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/storm_mode`

#### Path Parameters

| Name      | Type    | Description                                          |
| --------- | ------- | ---------------------------------------------------- |
| :site\_id | integer | The `{energy_site_id}` number from the products list |

#### Headers

| Name          | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| Authorization | string | Bearer `{access_token}` from authentication |

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

```
```

{% endtab %}
{% endtabs %}
