Sleep configuration
Set away status
Sets a user away (they leave the bed and their zone is freed) or brings them back.
Coming back puts them on their previous bed, 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 returning user gets their previous zones back and the sleeper on them is set away. To put someone on specific zones, use assign_zone instead. return_date (with is_away true) brings the user back automatically at the start of that sleep day (12:00 in the bed's timezone); for a user who is already away it only changes the return date.
Request parameters
Authorization string requiredYour API key as a bearer token: Bearer os_…. Make one on the API keys page; see Authentication.
is_awayboolean requiredtrue = mark away (leave the bed); false = return from away
return_datestring | null pattern ^\d{4}-\d{2}-\d{2}$Optional, only with is_away true: the sleep day (YYYY-MM-DD) the user is back. Must be after the current sleep day; null clears it.
user_idstring (uuid)Target user id (from list_devices shared_with). Defaults to the authenticated user. Anyone on a bed may move themselves; acting on another user needs the owner or admin role on a shared bed.
Response parameters
successboolean required
Errors
Every error answers { "error": { "code", "message" } }.
set_away