Docs

Sleep configuration

Set away status

Sets a user away (they leave the bed and their zone is freed) or brings them back.

POST
/v1/sleep-configuration/away

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

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
  • is_away boolean required

    true = mark away (leave the bed); false = return from away

  • return_date string | 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_id string (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

200 OK application/json
  • success boolean required

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: set_away