Docs

Schedules

Change one night of the schedule

Changes ONE night (tonight by default, or a later sleep_day) without changing the weekly schedule; that night keeps these values, the others follow the week.

PUT
/v1/schedules/nights

"Skip tonight" = enabled: false. A night has four phases, in time order and named as the Orion app shows them: bedtime, night, dawn and alarm. Each phase is { phase: "bedtime" | "night" | "dawn" | "alarm", time?: "HH:MM", temp_c?: number, remove?: true (night / dawn only), shape?: [...] (night / dawn only) }. alarm_enabled turns the alarm phase on (wakes you at the alarm time and turns the bed off after it) or off. Send only what changes. night and dawn keep their distance from bedtime or the alarm (usually night from bedtime, dawn from the alarm), so moving bedtime or the alarm moves them too unless you also send their time. Undo with revert_sleep_schedule_override. Returns the user's schedule after the change.

Request parameters

Headers
Authorization string required

Your API key as a bearer token: Bearer os_…. Make one on the API keys page; see Authentication.

Body application/json
  • sleep_day string pattern ^\d{4}-\d{2}-\d{2}$

    The sleep day (YYYY-MM-DD, the date the night starts in the bed's timezone): today or later. Defaults to tonight (the today of get_sleep_schedules).

  • enabled boolean

    false skips the night; true runs it.

  • alarm_enabled boolean

    The alarm phase on or off: on wakes you at the alarm time and turns the bed off after it; off lets the bed keep running past the alarm time.

  • phases object[]

    The night’s phase values to change.

  • user_id string (uuid)

    Whose schedule (from list_devices shared_with). Defaults to you. Editing another user needs the owner or admin role on a shared bed.

Response parameters

200 OK application/json
  • schedules record<string, object> required

    Keyed by user id

Errors

Every error answers { "error": { "code", "message" } }.

StatusCodeMeaning
400invalidInvalid input.
401unauthorizedMissing or unsupported API key.
403forbiddenNot allowed on this device or user.
429rate_limitedRate limit exceeded.
503unavailableNot available for this account.
Also an MCP tool: override_sleep_schedule_tonight