Docs

Schedules

Update recurring sleep schedules

Changes the RECURRING weekly schedule — the lasting way to change nightly behavior (e.g. "bedtime temperature 18°C every night" → one week entry per day, each with phases [{ phase: "bedtime", temp_c: 18 }]).

PUT
/v1/schedules

Send only the days and fields that change; unlisted days stay as they are. 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. enabled: false turns a day's schedule off. For one night only use override_sleep_schedule_tonight; for a one-off change at a set time use schedule_timeline_event. 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
  • week object[] required min items 1

    Days to change: { day: "sunday" … "saturday", enabled?, alarm_enabled?, phases? }.

  • 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: update_sleep_schedules