Alerts

Alert management for sensors

Get alerts

get
/alerts

Fetches alerts for all sensors the user has access to or a single sensor if an optional parameter is provided.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
sensorstringOptional

Optional filter to get alerts for a single sensor by its MAC address (e.g. C5:2A:E7:4D:CE:7F).

Example: C5:2A:E7:4D:CE:7FPattern: ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$
Responses
200

Alerts fetched successfully

application/json
Responseall of
get
/alerts
GET /alerts HTTP/1.1
Host: network.ruuvi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "result": "success",
  "data": {
    "sensors": [
      {
        "owner": "[email protected]",
        "sensor": "C5:2A:E7:4D:CE:7F",
        "name": "Ruuvi EEFF",
        "picture": "ruuvi_eeff.jpg",
        "public": false,
        "canShare": true,
        "offsetTemperature": 0,
        "offsetHumidity": 0,
        "offsetPressure": 0,
        "customProfile": false,
        "lastUpdated": 1715845699,
        "subscription": {
          "subscriptionName": "Pro",
          "maxClaims": 25,
          "maxShares": 40,
          "maxSharesPerSensor": 10,
          "maxHistoryDays": 731,
          "maxResolutionMinutes": 1,
          "emailAlertAllowed": true,
          "pushAlertAllowed": true,
          "telegramAlertAllowed": true,
          "delayedAlertAllowed": false,
          "pdfExportAllowed": false,
          "offlineAlertAllowed": true,
          "isActive": true,
          "endAt": "2025-12-05T06:15:43.000Z",
          "lastUpdated": 1701756942
        },
        "alerts": [
          {
            "type": "offline",
            "min": 0,
            "max": 900,
            "counter": 0,
            "delay": 0,
            "enabled": true,
            "description": "",
            "triggered": true,
            "triggeredAt": "2025-10-26T05:37:13.000Z",
            "lastUpdated": 1729918633
          },
          {
            "type": "temperature",
            "min": -40,
            "max": 85,
            "counter": 0,
            "delay": 0,
            "enabled": false,
            "description": "",
            "triggered": false,
            "triggeredAt": "2024-05-16T08:05:57.000Z",
            "lastUpdated": 1715845557
          }
        ]
      }
    ]
  }
}

Create and update Alerts

post
/alerts

Sets an alert on a sensor for a given metric. The alert condition is tested against the absolute value received from the sensors in conjunction with the user-set offsets for that particular sensor.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
sensorstringRequired

MAC address of the sensor (e.g. C5:2A:E7:4D:CE:7F)

Pattern: ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$
typestring · enumRequired

Type of alert condition

Possible values:
enabledbooleanOptional

Whether the alert is active. If missing, defaults to false. If value was already existing, it will not be changed.

minnumber · doubleOptional

Lower limit for the alert condition. If missing, defaults to 0. If value was already existing, it will not be changed.

maxnumber · doubleOptional

Upper limit for the alert condition. If missing, defaults to 0. If value was already existing, it will not be changed.

counterintegerOptional

Movement counter threshold (relevant for movement type alerts). If missing, defaults to 0. If value was already existing, it will not be changed.

descriptionstringOptional

User-provided description of the alert. If missing, defaults to empty string. If value was already existing, it will not be changed.

delayintegerOptional

Delay in minutes before triggering the alert. If missing, defaults to 0. If value was already existing, it will not be changed.

timestampinteger · int64Optional

Optional epoch timestamp for the alert. If missing, it is assumed to be the current time.

Responses
200

Alert stored or updated successfully

application/json
Responseall of
post
/alerts
POST /alerts HTTP/1.1
Host: network.ruuvi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "sensor": "C5:2A:E7:4D:CE:7F",
  "type": "temperature",
  "enabled": true,
  "min": 18.5,
  "max": 25,
  "description": "Temperature alert for greenhouse",
  "delay": 15
}
{
  "result": "success",
  "data": {
    "action": "success"
  }
}

Last updated