---
title: "Update Weekly Schedule"
method: PATCH
path: "/thermostats/{thermostatId}/schedule"
tags: ["thermostats"]
---

# Update Weekly Schedule

`PATCH /thermostats/{thermostatId}/schedule`

## Request

- Base URL: `https://api.sb.ecobee.com/api/v2`
- URL: `https://api.sb.ecobee.com/api/v2/thermostats/{thermostatId}/schedule`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.sb.ecobee.com/api/v2/token` scopes: `read:thermostat`, `write:thermostat`

Updates the weekly schedule for the thermostat with the given comfort ref. The time range includes the firstTimeBlock and goes up to but does not include the lastTimeBlock. Special case: When lastTimeBlock is set to '23:59', it represents the end of day (midnight) and includes the final 30-minute time slot (23:30-00:00), allowing a full day schedule from '00:00' to '23:59'. The schedule uses 48 time slots per day (each 30 minutes), where index 0 = 00:00-00:30 and index 47 = 23:30-00:00.

## Request body

- UpdateThermostatSchedule
  - `days` string[]
  - `firstTimeBlock` string: HH:MM representation of a time block in the schedule. Must be in half-hour intervals (minutes = 00 or 30), OR the special value '23:59' to represent end of day (midnight). Valid examples: '00:00', '00:30', '12:00', '23:00', '23:30', '23:59'. Invalid examples: '12:15', '23:58', '24:00'. When used as lastTimeBlock, '23:59' includes the final time slot (23:30-00:00).
  - `lastTimeBlock` string: HH:MM representation of a time block in the schedule. Must be in half-hour intervals (minutes = 00 or 30), OR the special value '23:59' to represent end of day (midnight). Valid examples: '00:00', '00:30', '12:00', '23:00', '23:30', '23:59'. Invalid examples: '12:15', '23:58', '24:00'. When used as lastTimeBlock, '23:59' includes the final time slot (23:30-00:00).
  - `comfortSettingRef` string: Comfort setting to set the schedule with

## Response `200`

Success

- UpdateThermostatScheduleResponse
  - `status` 'success'
  - `data` UpdateThermostatSchedule
    - `days` string[]
    - `firstTimeBlock` string: HH:MM representation of a time block in the schedule. Must be in half-hour intervals (minutes = 00 or 30), OR the special value '23:59' to represent end of day (midnight). Valid examples: '00:00', '00:30', '12:00', '23:00', '23:30', '23:59'. Invalid examples: '12:15', '23:58', '24:00'. When used as lastTimeBlock, '23:59' includes the final time slot (23:30-00:00).
    - `lastTimeBlock` string: HH:MM representation of a time block in the schedule. Must be in half-hour intervals (minutes = 00 or 30), OR the special value '23:59' to represent end of day (midnight). Valid examples: '00:00', '00:30', '12:00', '23:00', '23:30', '23:59'. Invalid examples: '12:15', '23:58', '24:00'. When used as lastTimeBlock, '23:59' includes the final time slot (23:30-00:00).
    - `comfortSettingRef` string: Comfort setting to set the schedule with

## Other responses

- `401`: Not authenticated
- `403`: Not authorized
- `404`: Not found
- `422`: Validation Failed
- `429`: Too many requests
- `500`: Internal server error
- `default`: Unexpected error

---

[API](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api.md) - [All operations](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api/revisions/d78d4fd5e1c6?raw)
