Sleep configuration

Who sleeps on which zone, and how to go away, come back, swap sides or split a device's zones.

Each zone of a device has at most one person on it. The sleep configuration says who is on which zone, and whether a person is away from the bed. List devices shows who is on each zone; these operations move people.

Anyone on a device may move themselves. Moving someone else needs the owner or admin role on a shared device: pass their user_id, from shared_with in List devices. Without user_id, an operation acts on you.

Read your configuration

Get sleep configuration returns whether you are away, the device you come back to and when, and your temperature units. Read it before you set yourself away.

GET /v1/sleep-configuration

Go away or come back

Set away takes a person off the bed and frees their zone, or brings them back.

POST /v1/sleep-configuration/away
{ "is_away": true, "return_date": "2026-12-12" }
JSON

With return_date, the person comes back on their own at the start of that sleep day (12:00 in the device's time zone). It must be after the current sleep day; null clears it. For someone who is already away, it changes only the return date.

Coming back puts the person on their previous device, on zones that move nobody else off it where possible: a partner who took both zones keeps one. If each zone already has its own sleeper, the person gets their previous zones back and the sleeper on them is set away. To choose the zones, use Assign zone.

Put someone on a zone

Assign zone puts a person on the zones you name. device_id and the zone ids come from List devices.

POST /v1/sleep-configuration/assign
{ "device_id": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7f1c6e85", "zone_ids": ["zone_b"] }
JSON

When a zone you name has someone on it, push_away_behavior decides what happens to them: switch_zone_first (the default) moves them to a free zone when there is one and sets them away when there is not; only_away always sets them away.

Swap sides

Swap zones swaps a person with the other person on their device. The device must have exactly two people, each on one zone. Pass your own id to swap yourself with your partner.

POST /v1/sleep-configuration/swap
{ "user_id": "9b2e4f10-5a7c-4d3b-8e61-0c9d2a4b7f33" }
JSON

Split zones

Split zones is for a person who holds both zones of a device alone. It keeps them on one zone and frees the other for a partner, so each side can be set on its own.

POST /v1/sleep-configuration/split

When a partner joins someone who holds both zones, call Split zones first, then Swap zones if they are on the wrong side.