Modes

Create a Mode for a Location

post/locations/{locationId}/modes

Request

Headers

Accept-Languagestring

Language header representing the client's preferred language. The format of the Accept-Language header follows what is defined in RFC 7231, section 5.3.5

Request body

labelstring required

A user-readable label used to identify the mode in the app. Unique per Location.

Example request

{
  "label": "Vacation"
}

Response

Created successfully

idstring ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$ required

Globally unique id for the Mode.

labelstring required

A user-readable label used to identify the mode in the app.

namestring ^[a-zA-Z0-9.-_]+$ required

An internal name for the Mode.

Example response

{
  "id": "9206ea57-2e2e-414c-a792-9087117ca3d8",
  "label": "Vacation",
  "name": "Home"
}

Changes