Minut API API Reference

A reference to Minut's HTTP API.

For an introductory guide to the API, see https://minut.com/developers.

API Endpoint
https://api.minut.com/v1
Terms of Service: https://minut.com/terms/
Contact: hello@minut.com
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: draft1

Authentication

OAuth

Access Code

type
oauth2
flow
accessCode
scopes
all

access all endpoints accessible to the user

authorizationUrl
https://api.minut.com/v1/oauth/authorize
tokenUrl
https://api.minut.com/v1/oauth/token

Devices

Get devices

GET /devices

Returns a list of all devices the authenticated user has access to.

200 OK

A list of devices

type
object
Response Example (200 OK)
{
  "devices": [
    {
      "device_id": "string",
      "device_mac": "string",
      "device_bluetooth_address": "string",
      "owner": "string",
      "home": "string",
      "active": "boolean",
      "offline": "boolean",
      "first_seen_at": "string (date-time)",
      "last_heard_from_at": "string (date-time)",
      "last_heartbeat_at": "string (date-time)",
      "firmware": {
        "installed": "integer (int32)",
        "wanted": "integer (int32)"
      },
      "hardware_version": "integer (int32)",
      "description": "string",
      "timezone": "string",
      "configuration": {
        "version": "integer (int32)",
        "installed_on_device_at": "string (date-time)",
        "updated_at": "string (date-time)",
        "room_type": "string",
        "glassbreak_config": {
          "active_until": "string",
          "active_from": "string"
        },
        "quiet_hours": {
          "enabled": "boolean",
          "start": "string",
          "end": "string"
        },
        "reactions": [
          {
            "type": "string",
            "notifications": [
              "string"
            ],
            "value": "number"
          }
        ]
      },
      "ongoing_events": [
        "string"
      ],
      "battery": {
        "voltage": "number (float)",
        "low_warning_sent_at": "string (date-time)",
        "percent": "number (float)"
      },
      "location": {
        "longitude": "number",
        "latitude": "number"
      }
    }
  ]
}

Get a device

GET /devices/{device_id}

Returns a device

device_id: string
in path

Device ID

200 OK

A Device

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "device_id": "string",
  "device_mac": "string",
  "device_bluetooth_address": "string",
  "owner": "string",
  "home": "string",
  "active": "boolean",
  "offline": "boolean",
  "first_seen_at": "string (date-time)",
  "last_heard_from_at": "string (date-time)",
  "last_heartbeat_at": "string (date-time)",
  "firmware": {
    "installed": "integer (int32)",
    "wanted": "integer (int32)"
  },
  "hardware_version": "integer (int32)",
  "description": "string",
  "timezone": "string",
  "configuration": {
    "version": "integer (int32)",
    "installed_on_device_at": "string (date-time)",
    "updated_at": "string (date-time)",
    "room_type": "string",
    "glassbreak_config": {
      "active_until": "string",
      "active_from": "string"
    },
    "quiet_hours": {
      "enabled": "boolean",
      "start": "string",
      "end": "string"
    },
    "reactions": [
      {
        "type": "string",
        "notifications": [
          "string"
        ],
        "value": "number"
      }
    ]
  },
  "ongoing_events": [
    "string"
  ],
  "battery": {
    "voltage": "number (float)",
    "low_warning_sent_at": "string (date-time)",
    "percent": "number (float)"
  },
  "location": {
    "longitude": "number",
    "latitude": "number"
  }
}

Update a device

PUT /devices/{device_id}

Update one or multiple fields of a device.

This endpoint also allows you to change the settings for a device.

Allowed notifications are:

Type Description
push A push notification is sent to the user's phone
light Point pulsates in bright yellow
beep Point plays a ringing bell sound

Configuration values to change on a device

device_id: string
in path

Device ID

Request Example
{
  "description": "string",
  "home": "string",
  "timezone": "string",
  "glassbreak_config": {
    "active_from": "2017-04-18T12:17:37.172Z",
    "active_until": "2017-04-19T12:17:37.172Z"
  },
  "quiet_hours": {
    "enabled": "boolean",
    "start": "string",
    "end": "string"
  },
  "room_type": "string",
  "location": {
    "type": "string",
    "coordinates": [
      "number"
    ]
  },
  "reactions": [
    {
      "type": "string",
      "notifications": [
        "string"
      ],
      "value": "number"
    }
  ]
}
200 OK

An updated device

400 Bad Request

Bad input

type
object
401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "device_id": "string",
  "device_mac": "string",
  "device_bluetooth_address": "string",
  "owner": "string",
  "home": "string",
  "active": "boolean",
  "offline": "boolean",
  "first_seen_at": "string (date-time)",
  "last_heard_from_at": "string (date-time)",
  "last_heartbeat_at": "string (date-time)",
  "firmware": {
    "installed": "integer (int32)",
    "wanted": "integer (int32)"
  },
  "hardware_version": "integer (int32)",
  "description": "string",
  "timezone": "string",
  "configuration": {
    "version": "integer (int32)",
    "installed_on_device_at": "string (date-time)",
    "updated_at": "string (date-time)",
    "room_type": "string",
    "glassbreak_config": {
      "active_until": "string",
      "active_from": "string"
    },
    "quiet_hours": {
      "enabled": "boolean",
      "start": "string",
      "end": "string"
    },
    "reactions": [
      {
        "type": "string",
        "notifications": [
          "string"
        ],
        "value": "number"
      }
    ]
  },
  "ongoing_events": [
    "string"
  ],
  "battery": {
    "voltage": "number (float)",
    "low_warning_sent_at": "string (date-time)",
    "percent": "number (float)"
  },
  "location": {
    "longitude": "number",
    "latitude": "number"
  }
}
Response Example (400 Bad Request)
{
  "error": "string",
  "status": "integer (int32)",
  "context": [
    "string"
  ]
}

Get temperature readings

GET /devices/{device_id}/temperature
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Temperature readings

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Get humidity readings

GET /devices/{device_id}/humidity
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Humidity readings

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Get barometric pressure readings

GET /devices/{device_id}/pressure
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Pressure readings

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Get sound level readings

GET /devices/{device_id}/sound_level
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Average sound level

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Get battery voltage readings

GET /devices/{device_id}/battery
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Battery readings

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Get ambient light readings

GET /devices/{device_id}/part_als
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Ambient light readings

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Get ambient light IR readings

GET /devices/{device_id}/part_als_ir
device_id: string
in path

Device ID

start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

raw: boolean
in query

Returns raw data as received from the device

200 OK

Ambient light IR readings

401 Unauthorized

User is not authorized access

404 Not Found

The Device does not exist

Response Example (200 OK)
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

Events

Get events

GET /events

Get a sorted list of events belonging to the authenticated user.

Type Description
alarm_heard An alarm sound was recognised
glassbreak The sound of glass break was detected
short_button_press The button on Point was pressed
temperature_high Temperature is higher than the configured threshold
temperature_low Temperature is lower than the configured threshold
temperature_dropped_normal Temperature is back down to normal
temperature_risen_normal Temperature is back up to normal
humidity_high Humidity is higher than the configured threshold
humidity_low Humidity is lower than the configured threshold
humidity_dropped_normal Humidity is back down to normal
humidity_risen_normal Humidity is back up to normal
avg_sound_high Average sound levels are higher than the configured threshold
sound_level_high_quiet_hours Sound levels high during quiet hours
sound_level_high_despite_warning Sound levels continue to be high despite warnings
sound_level_dropped_normal Sound levels are back down to normal
device_offline Device went offline
device_online Device went online
tamper Point was removed from or put back on its mounting plate
battery_low The batteries are soon empty, approximately 2 weeks left
battery_empty The batteries are empty
start_at: string
in query

The date-time to start fetching data from

end_at: string
in query

The date-time to stop fetching data from

limit: number
in query

Limit how many results to fetch. Default is 500

offset: number
in query

Starting offset when fetching results. Default is 0

order: string asc, desc
in query

Defines the time sorting order. Default is 'asc'

200 OK

A list of events

type
Response Example (200 OK)
[
  {
    "event_id": "string",
    "type": "string",
    "created_at": "string (date-time)",
    "user_id": "string",
    "device_id": "string",
    "home_id": "string",
    "sensor_value": "number",
    "sensor_threshold": "number",
    "start_created_at": "string (date-time)",
    "feedback_question_id": "string",
    "text_params": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "actions": [
      {
        "url": "string"
      }
    ],
    "graph": {
      "start_at": "string (date-time)",
      "end_at": "string (date-time)",
      "unit": "string",
      "sensor_type": "number"
    }
  }
]

Homes

Get homes

GET /homes

Returns a list of all homes the user has access to

200 OK

A list of homes

type
object
Response Example (200 OK)
{
  "devices": [
    {
      "home_id": "string",
      "name": "string",
      "created_at": "string (date-time)",
      "created_by": "string",
      "timezone": "string",
      "location": {
        "longitude": "number",
        "latitude": "number"
      },
      "alarm_status": "string",
      "detailed_alarm_status": "string",
      "alarm_off_grace_period_secs": "number",
      "grace_period_expires_at": "string (date-time)",
      "devices": [
        {
          "device_id": "string"
        }
      ],
      "members": [
        {
          "user_id": "string",
          "joined_at": "string (date-time)",
          "fullname": "string",
          "email": "string",
          "status": "string"
        }
      ]
    }
  ]
}

Get a home

GET /homes/{home_id}

Returns a home

home_id: string
in path

Home ID

200 OK

A Home

401 Unauthorized

User is not authorized access

404 Not Found

The home does not exist

Response Example (200 OK)
{
  "home_id": "string",
  "name": "string",
  "created_at": "string (date-time)",
  "created_by": "string",
  "timezone": "string",
  "location": {
    "longitude": "number",
    "latitude": "number"
  },
  "alarm_status": "string",
  "detailed_alarm_status": "string",
  "alarm_off_grace_period_secs": "number",
  "grace_period_expires_at": "string (date-time)",
  "devices": [
    {
      "device_id": "string"
    }
  ],
  "members": [
    {
      "user_id": "string",
      "joined_at": "string (date-time)",
      "fullname": "string",
      "email": "string",
      "status": "string"
    }
  ]
}

Update a home

PUT /homes/{home_id}

Update one or multiple fields of a home.

Configuration values to change on a home

home_id: string
in path

Home ID

Request Example
{
  "name": "string",
  "timezone": "string",
  "location": {
    "longitude": "number",
    "latitude": "number"
  }
}
200 OK

An updated home

400 Bad Request

Bad input

type
object
401 Unauthorized

User is not authorized access

404 Not Found

The home does not exist

Response Example (200 OK)
{
  "home_id": "string",
  "name": "string",
  "created_at": "string (date-time)",
  "created_by": "string",
  "timezone": "string",
  "location": {
    "longitude": "number",
    "latitude": "number"
  },
  "alarm_status": "string",
  "detailed_alarm_status": "string",
  "alarm_off_grace_period_secs": "number",
  "grace_period_expires_at": "string (date-time)",
  "devices": [
    {
      "device_id": "string"
    }
  ],
  "members": [
    {
      "user_id": "string",
      "joined_at": "string (date-time)",
      "fullname": "string",
      "email": "string",
      "status": "string"
    }
  ]
}
Response Example (400 Bad Request)
{
  "error": "string",
  "status": "integer (int32)",
  "context": [
    "string"
  ]
}

Update detailed alarm status

PUT /homes/{home_id}/alarm

Update the detailed alarm status of a home

Configuration values to change for the alarm status on a home

home_id: string
in path

(no description)

Request Example
{
  "alarm_status": "on_grace_period"
}
200 OK

An updated home

400 Bad Request

Bad input

401 Unauthorized

User is not authorized access

404 Not Found

The home does not exist

Response Example (200 OK)
{
  "home_id": "string",
  "name": "string",
  "created_at": "string (date-time)",
  "created_by": "string",
  "timezone": "string",
  "location": {
    "longitude": "number",
    "latitude": "number"
  },
  "alarm_status": "string",
  "detailed_alarm_status": "string",
  "alarm_off_grace_period_secs": "number",
  "grace_period_expires_at": "string (date-time)",
  "devices": [
    {
      "device_id": "string"
    }
  ],
  "members": [
    {
      "user_id": "string",
      "joined_at": "string (date-time)",
      "fullname": "string",
      "email": "string",
      "status": "string"
    }
  ]
}

OAuth

Request an authorization code

GET /oauth/authorize
response_type: string
in query

Must be set to "code"

client_id: string
in query

The client id

redirect_uri: string
in query

Where to redirect the user-agent after performing the request. Must match the redirect_uri specified when the client was created.

scope: string
in query

Space separated list of scopes to request.

state: string
in query

An opaque value used by the client to maintain state between the request and the callback.

200 OK

An authorization code

type
object
400 Bad Request

Bad request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "code": "string"
}

Token exchange

POST /oauth/token

There are three ways to get a bearer token which are requried for all other endpoints.

  1. Exchange an authorization_code
  2. Exchange username and password
  3. Exchange a refresh_token

All exchange methods will return a short-lived bearer token and a refresh token.

Set the TokenExchange parameters required for the grant_type used.

Request Example
{
  "grant_type": "string",
  "redirect_uri": "string",
  "client_id": "string",
  "client_secret": "string",
  "code": "string",
  "username": "string",
  "password": "string",
  "refresh_token": "string",
  "token": "string"
}
200 OK

A bearer and refresh token token

type
object
400 Bad Request

Bad request

401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "access_token": "string",
  "refresh_token": "string",
  "expires_in": "integer",
  "token_type": "string",
  "user_id": "string"
}

Revoke a refresh token

POST /oauth/revoke

Refresh token to revoke

Request Example
{
  "token": "string",
  "client_id": "string",
  "client_secret": "string"
}
200 OK

Status of revokation

type
object
Response Example (200 OK)
{
  "revoked": "boolean"
}

Users

Get users

GET /users
user_id: string
in query

(no description)

200 OK

Return a user

Response Example (200 OK)
{
  "user_id": "string",
  "fullname": "string",
  "nick": "string",
  "email": "string",
  "subscribe_newsletter": "boolean",
  "created_at": "string (date-time)",
  "updated_at": "string (date-time)",
  "roles": [
    "string"
  ],
  "share_location": "boolean"
}

Update a user

PUT /users

undefined

user_id: string
in query

(no description)

Request Example
{
  "user_id": "string",
  "fullname": "string",
  "nick": "string",
  "email": "string",
  "subscribe_newsletter": "boolean",
  "created_at": "string (date-time)",
  "updated_at": "string (date-time)",
  "roles": [
    "string"
  ],
  "share_location": "boolean"
}
200 OK

User updated

Webhooks

Create a webhook

POST /webhooks

Information about where to POST events

Request Example
{
  "hook_secret": "string",
  "url": "string",
  "token": "string",
  "events": [
    "string"
  ]
}
201 Created

A webhook

400 Bad Request

Bad request

401 Unauthorized

Unauthorized

Response Example (201 Created)
{
  "hook_id": "string",
  "hook_secret": "string",
  "url": "string",
  "token": "string",
  "events": [
    "string"
  ]
}

Get all webhooks

GET /webhooks
200 OK

A list of webhooks

type
object
401 Unauthorized

Unauthorized

Response Example (200 OK)
{
  "hooks": [
    {
      "hook_id": "string",
      "hook_secret": "string",
      "url": "string",
      "token": "string",
      "events": [
        "string"
      ]
    }
  ]
}

Delete a webhook

DELETE /webhooks/{hook_id}
hook_id: string
in path

Webhook ID

200 OK

Returns an empty object on success {}

400 Bad Request

Bad request

401 Unauthorized

Unauthorized

404 Not Found

Not Found

Trigger a sample event

POST /webhooks/{hook_id}/ping
hook_id: string
in path

Webhook ID

201 Created

Returns an empty object on success {}

400 Bad Request

Bad request

404 Not Found

Not Found

Invitations

Get invitations

GET /homes/{home_id}/invitations

Returns invitations

home_id: string
in path

Home ID

200 OK

List of invitations to the home

type
object
Response Example (200 OK)
{
  "home_id": "string",
  "invitations": [
    {
      "invitation_id": "string",
      "invitation_code": "string",
      "email": "string",
      "phone_number": "string",
      "group": "string",
      "accepted": "boolean",
      "created_at": "string (date-time)",
      "invited_by": {
        "name": "string",
        "user_id": "string"
      }
    }
  ]
}

Create invitations

POST /homes/{home_id}/invitations
group: string friends, family
email: string
name: string
phone_number: string
home_id: string
in path

Home ID

Request Example
{
  "group": "string",
  "email": "string",
  "name": "string",
  "phone_number": "string"
}
201 Created

Invitation created

Response Example (201 Created)
{
  "invitation_id": "string",
  "invitation_code": "string",
  "email": "string",
  "phone_number": "string",
  "group": "string",
  "accepted": "boolean",
  "created_at": "string (date-time)",
  "invited_by": {
    "name": "string",
    "user_id": "string"
  }
}

Accept invitations

PUT /homes/{home_id}/invitations/{code}
accept: boolean
home_id: string
in path

Home ID

code: string
in path

(no description)

Request Example
{
  "accept": "boolean"
}
200 OK

Invitation accepted

Delete invitations

DELETE /homes/{home_id}/invitations/{code}
home_id: string
in path

Home ID

code: string
in path

(no description)

200 OK

Invitation deleted

Accept invitations

PUT /invitations

Accept an invitation using an invitation code

invitation_code: string
Request Example
{
  "invitation_code": "string"
}
200 OK

Invitation confirmation

type
object
400 Bad Request

Invalid invitation code

Response Example (200 OK)
{
  "home_id": "string",
  "home_name": "string",
  "group": "string"
}

Schema Definitions

ClientApplication: object

owner: string
name: string
description: string
url: string
client_id: string
client_secret: string
created_at: string (date-time)
Example
{
  "owner": "string",
  "name": "string",
  "description": "string",
  "url": "string",
  "client_id": "string",
  "client_secret": "string",
  "created_at": "string (date-time)"
}

User: object

user_id: string
fullname: string
nick: string
email: string
subscribe_newsletter: boolean
created_at: string (date-time)
updated_at: string (date-time)
roles: string[]
string
share_location: boolean
Example
{
  "user_id": "string",
  "fullname": "string",
  "nick": "string",
  "email": "string",
  "subscribe_newsletter": "boolean",
  "created_at": "string (date-time)",
  "updated_at": "string (date-time)",
  "roles": [
    "string"
  ],
  "share_location": "boolean"
}

Home: object

home_id: string
name: string
created_at: string (date-time)
created_by: string
timezone: string
location: object
longitude: number
latitude: number
alarm_status: string on, off, off_grace_period
detailed_alarm_status: string on, off, off_grace_period, on_grace_period
alarm_off_grace_period_secs: number
grace_period_expires_at: string (date-time)
devices: object[]
object
device_id: string
members: object[]
object
user_id: string
joined_at: string (date-time)
fullname: string
email: string
status: string away, home
Example
{
  "home_id": "string",
  "name": "string",
  "created_at": "string (date-time)",
  "created_by": "string",
  "timezone": "string",
  "location": {
    "longitude": "number",
    "latitude": "number"
  },
  "alarm_status": "string",
  "detailed_alarm_status": "string",
  "alarm_off_grace_period_secs": "number",
  "grace_period_expires_at": "string (date-time)",
  "devices": [
    {
      "device_id": "string"
    }
  ],
  "members": [
    {
      "user_id": "string",
      "joined_at": "string (date-time)",
      "fullname": "string",
      "email": "string",
      "status": "string"
    }
  ]
}

HomeConfig: object

name: string
timezone: string
location: object
longitude: number
latitude: number
Example
{
  "name": "string",
  "timezone": "string",
  "location": {
    "longitude": "number",
    "latitude": "number"
  }
}

AlarmDetailedStatus: object

alarm_status: string on, off, on_grace_period, off_grace_period
Example
{
  "alarm_status": "on_grace_period"
}

Invitation: object

invitation_id: string
invitation_code: string
email: string
phone_number: string
group: string family, friends
accepted: boolean
created_at: string (date-time)
invited_by: object
name: string
user_id: string
Example
{
  "invitation_id": "string",
  "invitation_code": "string",
  "email": "string",
  "phone_number": "string",
  "group": "string",
  "accepted": "boolean",
  "created_at": "string (date-time)",
  "invited_by": {
    "name": "string",
    "user_id": "string"
  }
}

Event: object

event_id: string
type: string
created_at: string (date-time)
user_id: string
device_id: string
home_id: string
sensor_value: number
sensor_threshold: number
start_created_at: string (date-time)
feedback_question_id: string
text_params: object[]
object
key: string
value: string
actions: object[]
object
url: string
graph: object
start_at: string (date-time)
end_at: string (date-time)
unit: string c, %, hPa,
sensor_type: number
Example
{
  "event_id": "string",
  "type": "string",
  "created_at": "string (date-time)",
  "user_id": "string",
  "device_id": "string",
  "home_id": "string",
  "sensor_value": "number",
  "sensor_threshold": "number",
  "start_created_at": "string (date-time)",
  "feedback_question_id": "string",
  "text_params": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "actions": [
    {
      "url": "string"
    }
  ],
  "graph": {
    "start_at": "string (date-time)",
    "end_at": "string (date-time)",
    "unit": "string",
    "sensor_type": "number"
  }
}

Reaction: object

type: string
notifications: string[]
string
value: number
Example
{
  "type": "string",
  "notifications": [
    "string"
  ],
  "value": "number"
}

DeviceConfig: object

description: string
home: string
timezone: string

The Olson ID for a timezone, e.g., Europe/Stockholm

glassbreak_config: object
active_from: string
active_until: string
quiet_hours: object
enabled: boolean
start: string
end: string
room_type: string
location: object
type: string Point
coordinates: number[] (2 chars)

Must contain [longitude, latitude]

number
reactions: Reaction
Reaction
Example
{
  "description": "string",
  "home": "string",
  "timezone": "string",
  "glassbreak_config": {
    "active_from": "2017-04-18T12:17:37.172Z",
    "active_until": "2017-04-19T12:17:37.172Z"
  },
  "quiet_hours": {
    "enabled": "boolean",
    "start": "string",
    "end": "string"
  },
  "room_type": "string",
  "location": {
    "type": "string",
    "coordinates": [
      "number"
    ]
  },
  "reactions": [
    {
      "type": "string",
      "notifications": [
        "string"
      ],
      "value": "number"
    }
  ]
}

Device: object

device_id: string
device_mac: string
device_bluetooth_address: string
owner: string
home: string
active: boolean

false if the device has been moved to a different account

offline: boolean

true if the backend hasn't heard from the device in 3 hours

first_seen_at: string (date-time)
last_heard_from_at: string (date-time)
last_heartbeat_at: string (date-time)
firmware: object
installed: integer (int32)
wanted: integer (int32)
hardware_version: integer (int32)
description: string
timezone: string

The Olson ID describing the timezone, e.g., Europe/Stockholm

configuration: object
version: integer (int32)
installed_on_device_at: string (date-time)
updated_at: string (date-time)
room_type: string
glassbreak_config: object
active_until: string
active_from: string
quiet_hours: object
enabled: boolean
start: string
end: string
reactions: Reaction
Reaction
ongoing_events: string[]
string
battery: object
voltage: number (float)
low_warning_sent_at: string (date-time)
percent: number (float)
location: object
longitude: number
latitude: number
Example
{
  "device_id": "string",
  "device_mac": "string",
  "device_bluetooth_address": "string",
  "owner": "string",
  "home": "string",
  "active": "boolean",
  "offline": "boolean",
  "first_seen_at": "string (date-time)",
  "last_heard_from_at": "string (date-time)",
  "last_heartbeat_at": "string (date-time)",
  "firmware": {
    "installed": "integer (int32)",
    "wanted": "integer (int32)"
  },
  "hardware_version": "integer (int32)",
  "description": "string",
  "timezone": "string",
  "configuration": {
    "version": "integer (int32)",
    "installed_on_device_at": "string (date-time)",
    "updated_at": "string (date-time)",
    "room_type": "string",
    "glassbreak_config": {
      "active_until": "string",
      "active_from": "string"
    },
    "quiet_hours": {
      "enabled": "boolean",
      "start": "string",
      "end": "string"
    },
    "reactions": [
      {
        "type": "string",
        "notifications": [
          "string"
        ],
        "value": "number"
      }
    ]
  },
  "ongoing_events": [
    "string"
  ],
  "battery": {
    "voltage": "number (float)",
    "low_warning_sent_at": "string (date-time)",
    "percent": "number (float)"
  },
  "location": {
    "longitude": "number",
    "latitude": "number"
  }
}

TimeSeries: object

unit: string c, %, hPa,
values: object[]
object
value: number
datetime: string (date-time)
Example
{
  "unit": "string",
  "values": [
    {
      "value": "number",
      "datetime": "string (date-time)"
    }
  ]
}

TokenExchange: object

grant_type: string refresh_token, authorization_code, password

Grant type to exchange for access token

redirect_uri: string

Required if redirect_uri was provided in the authorize request and must be identical in that case.

client_id: string

Client ID if not provided using HTTP Basic Auth

client_secret: string

Client secret if not provided using HTTP Basic Auth

code: string

Authorization code is grant_type is authorization_code

username: string

Username if grant_type is password.

password: string

Password if grant_type is password.

refresh_token: string

Refresh token if grant_type is refresh_token.

token: string

Token if grant_type implies converting from a trusted third-party token.

Example
{
  "grant_type": "string",
  "redirect_uri": "string",
  "client_id": "string",
  "client_secret": "string",
  "code": "string",
  "username": "string",
  "password": "string",
  "refresh_token": "string",
  "token": "string"
}

TokenRevoke: object

token: string

The refresh token to revoke

client_id: string
client_secret: string
Example
{
  "token": "string",
  "client_id": "string",
  "client_secret": "string"
}

Webhook: object

hook_id: string
hook_secret: string

Only returned when the webhook is created. Can be used by the receiver to identify Minut and a particular webhook when a POST request is issued.

url: string

The URL to POST events to.

token: string

Will be attached to the Authorization header of the outgoing POST request

events: string[]
string

Use '*' to subscribe to all events.

Example
{
  "hook_id": "string",
  "hook_secret": "string",
  "url": "string",
  "token": "string",
  "events": [
    "string"
  ]
}