# Create a Thermostat Daily Program

* [Request Parameters](#request-parameters)
* [Response](#response)

Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program.

{% tabs %}
{% tab title="JavaScript" %}
Creates a new thermostat daily program.

**Code:**

```javascript
await seam.thermostats.dailyPrograms.create({
  device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
  name: "Weekday Program",
  periods: [
    { starts_at_time: "07:00:00", climate_preset_key: "Home" },
    { starts_at_time: "09:00:00", climate_preset_key: "Away" },
    { starts_at_time: "16:00:00", climate_preset_key: "Home" },
    { starts_at_time: "22:30:00", climate_preset_key: "Sleep" },
  ],
});
```

**Output:**

```javascript
{
  "created_at": "2025-06-14T16:54:17.946642Z",
  "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
  "name": "Weekday Program",
  "periods": [
    { "starts_at_time": "07:00:00", "climate_preset_key": "Home" },
    { "starts_at_time": "09:00:00", "climate_preset_key": "Away" },
    { "starts_at_time": "16:00:00", "climate_preset_key": "Home" },
    { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" }
  ],
  "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
  "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454"
}
```

{% endtab %}

{% tab title="cURL" %}
Creates a new thermostat daily program.

**Code:**

```curl
curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/create" \
  --header "Authorization: Bearer $SEAM_API_KEY" \
  --json @- <<EOF
{
  "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
  "name": "Weekday Program",
  "periods": [
    {
      "starts_at_time": "07:00:00",
      "climate_preset_key": "Home"
    },
    {
      "starts_at_time": "09:00:00",
      "climate_preset_key": "Away"
    },
    {
      "starts_at_time": "16:00:00",
      "climate_preset_key": "Home"
    },
    {
      "starts_at_time": "22:30:00",
      "climate_preset_key": "Sleep"
    }
  ]
}
EOF
```

**Output:**

```curl
{
  "thermostat_daily_program": {
    "created_at": "2025-06-14T16:54:17.946642Z",
    "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
    "name": "Weekday Program",
    "periods": [
      { "starts_at_time": "07:00:00", "climate_preset_key": "Home" },
      { "starts_at_time": "09:00:00", "climate_preset_key": "Away" },
      { "starts_at_time": "16:00:00", "climate_preset_key": "Home" },
      { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" }
    ],
    "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
    "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454"
  }
}
```

{% endtab %}

{% tab title="Python" %}
Creates a new thermostat daily program.

**Code:**

```python
seam.thermostats.daily_programs.create(
    device_id="cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
    name="Weekday Program",
    periods=[
        {"starts_at_time": "07:00:00", "climate_preset_key": "Home"},
        {"starts_at_time": "09:00:00", "climate_preset_key": "Away"},
        {"starts_at_time": "16:00:00", "climate_preset_key": "Home"},
        {"starts_at_time": "22:30:00", "climate_preset_key": "Sleep"},
    ],
)
```

**Output:**

```python
ThermostatDailyProgram(
    created_at="2025-06-14T16:54:17.946642Z",
    device_id="cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
    name="Weekday Program",
    periods=[
        {"starts_at_time": "07:00:00", "climate_preset_key": "Home"},
        {"starts_at_time": "09:00:00", "climate_preset_key": "Away"},
        {"starts_at_time": "16:00:00", "climate_preset_key": "Home"},
        {"starts_at_time": "22:30:00", "climate_preset_key": "Sleep"},
    ],
    thermostat_daily_program_id="ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
    workspace_id="8da8d923-e55b-45cd-84a3-6c96b3d3d454",
)
```

{% endtab %}

{% tab title="Ruby" %}
Creates a new thermostat daily program.

**Code:**

```ruby
seam.thermostats.daily_programs.create(
  device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
  name: "Weekday Program",
  periods: [
    { starts_at_time: "07:00:00", climate_preset_key: "Home" },
    { starts_at_time: "09:00:00", climate_preset_key: "Away" },
    { starts_at_time: "16:00:00", climate_preset_key: "Home" },
    { starts_at_time: "22:30:00", climate_preset_key: "Sleep" },
  ],
)
```

**Output:**

```ruby
{
  "created_at" => "2025-06-14T16:54:17.946642Z",
  "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
  "name" => "Weekday Program",
  "periods" => [
    { starts_at_time: "07:00:00", climate_preset_key: "Home" },
    { starts_at_time: "09:00:00", climate_preset_key: "Away" },
    { starts_at_time: "16:00:00", climate_preset_key: "Home" },
    { starts_at_time: "22:30:00", climate_preset_key: "Sleep" },
  ],
  "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
  "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454",
}
```

{% endtab %}

{% tab title="PHP" %}
Creates a new thermostat daily program.

**Code:**

```php
$seam->thermostats->daily_programs->create(
    device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
    name: "Weekday Program",
    periods: [
        ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"],
        ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"],
        ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"],
        ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"],
    ],
);
```

**Output:**

```php
[
    "created_at" => "2025-06-14T16:54:17.946642Z",
    "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
    "name" => "Weekday Program",
    "periods" => [
        ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"],
        ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"],
        ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"],
        ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"],
    ],
    "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
    "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454",
];
```

{% endtab %}

{% tab title="Seam CLI" %}
Creates a new thermostat daily program.

**Code:**

```seam_cli
seam thermostats daily-programs create --device_id "cc2d0fb9-1f5f-410f-80f1-a64b699de82a" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"16:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}]
```

**Output:**

```seam_cli
{
  "created_at": "2025-06-14T16:54:17.946642Z",
  "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a",
  "name": "Weekday Program",
  "periods": [
    { "starts_at_time": "07:00:00", "climate_preset_key": "Home" },
    { "starts_at_time": "09:00:00", "climate_preset_key": "Away" },
    { "starts_at_time": "16:00:00", "climate_preset_key": "Home" },
    { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" }
  ],
  "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
  "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454"
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Authentication Methods</summary>

* API key
* Client session token
* Personal access token\
  Must also include the `seam-workspace` header in the request.

To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication).

</details>

## Request Parameters

**`device_id`** *String* (Required)

ID of the thermostat device for which you want to create a daily program.

***

**`name`** *String* (Required)

Name of the thermostat daily program.

***

**`periods`** *Array* *of Objects* (Required)

Array of thermostat daily program periods.

<details>

<summary><code>climate_preset_key</code> <em>String</em></summary>

Key of the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`.

</details>

***

<details>

<summary><code>starts_at_time</code> <em>String</em></summary>

Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.

</details>

***

## Response

{% hint style="success" %}
Returns: [**thermostat\_daily\_program**](/latest/api/thermostats/daily_programs.md)
{% endhint %}

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

```json
{
  "created_at": "2025-06-14T16:54:17.946642Z",
  "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1",
  "name": "Weekday Program",
  "periods": [
    { "starts_at_time": "07:00:00", "climate_preset_key": "Home" },
    { "starts_at_time": "09:00:00", "climate_preset_key": "Away" },
    { "starts_at_time": "16:00:00", "climate_preset_key": "Home" },
    { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" }
  ],
  "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d",
  "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454"
}
```

{% 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://docs.seam.co/latest/api/thermostats/daily_programs/create.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.
