Skip to content
Docs menu

Back to all methods

setSleepWindow

write

Sets one night's bedtime and wake time, moving it or creating it; filed under the wake-up date. Sets one night's bedtime and wake time, as Garmin Connect's edit-sleep-times dialog does. `cdate` is the date Garmin files the night under, the WAKE-UP day. Reads the night through `getSleepData` first. A RECORDED night's `id` is its current `sleepStartTimestampGMT` in epoch ms and CHANGES after every edit, so it is read fresh, then PUT to `/sleep-service/sleep/dailySleep/{id}` with `{calendarDate, sleepStartTimestampGMT, sleepEndTimestampGMT, sleepTimeSeconds, napTimeSeconds, sleepWindowConfirmed:…

setSleepWindow(cdate, sleepStart, sleepEnd)
ParameterTypeOptionalDescription
cdatestringnoCalendar date, YYYY-MM-DD (UTC)
sleepStartstring (ISO date-time)noA moment in time, ISO 8601, e.g. 2026-09-28T07:30:00 (local) or with Z/offset
sleepEndstring (ISO date-time)noA moment in time, ISO 8601, e.g. 2026-09-28T07:30:00 (local) or with Z/offset

In Claude this is the set_sleep_window tool.

Guide: wellness