Skip to main content
POST
/
thermostats
/
schedules
/
create
await seam.thermostats.schedules.create({
  device_id: "d710aa35-232d-442b-a817-c28045de1c74",
  name: "Jane's Stay",
  climate_preset_key: "Occupied",
  max_override_period_minutes: 90,
  starts_at: "2025-06-19T15:00:00.000Z",
  ends_at: "2025-06-22T11:00:00.000Z",
  is_override_allowed: true,
});

/*
{
  "climate_preset_key": "Occupied",
  "created_at": "2025-06-14T16:54:17.946316Z",
  "device_id": "d710aa35-232d-442b-a817-c28045de1c74",
  "ends_at": "2025-06-22T11:00:00.000Z",
  "errors": [],
  "is_override_allowed": true,
  "max_override_period_minutes": 90,
  "name": "Jane's Stay",
  "starts_at": "2025-06-22T11:00:00.000Z",
  "thermostat_schedule_id": "af2cb7f7-9f28-40da-a0a0-e7a008ef7a35",
  "workspace_id": "58419b36-6103-44e5-aa83-2163e90cce01"
}
*/
{
  "ok": true,
  "thermostat_schedule": {
    "climate_preset_key": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "ends_at": "2023-11-07T05:31:56Z",
    "errors": [
      {
        "error_code": "<string>",
        "message": "<string>"
      }
    ],
    "name": "<string>",
    "starts_at": "2023-11-07T05:31:56Z",
    "thermostat_schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "is_override_allowed": true,
    "max_override_period_minutes": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
climate_preset_key
string
required

Key of the climate preset to use for the new thermostat schedule.

device_id
string
required

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

ends_at
string
required

Date and time at which the new thermostat schedule ends, in ISO 8601 format.

starts_at
string
required

Date and time at which the new thermostat schedule starts, in ISO 8601 format.

is_override_allowed
boolean

Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the new schedule is active. See also Specifying Manual Override Permissions.

max_override_period_minutes
integer | null

Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also Specifying Manual Override Permissions.

Required range: x > 0
name
string

Name of the thermostat schedule.

Response

OK

ok
boolean
required
thermostat_schedule
object
required

Represents a thermostat schedule that activates a configured climate preset on a thermostat at a specified starting time and deactivates the climate preset at a specified ending time.