Notifications API
List notifications
GET /api/v1/notifications
Authorization: Bearer <token>
Query params:
| Param | Type | Description |
|---|---|---|
projectId | UUID | Filter by project |
deviceId | UUID | Filter by device |
type | string | threshold | device_status | no_data |
unread | boolean | true = only unread |
limit | number | Max results (default: 20) |
page | number | Page number |
Mark notification as read
PATCH /api/v1/notifications/{id}/read
Authorization: Bearer <token>
Mark all as read
PATCH /api/v1/notifications/read-all
Authorization: Bearer <token>
Delete a notification
DELETE /api/v1/notifications/{id}
Authorization: Bearer <token>
Notification rules
List rules
GET /api/v1/notifications/rules?projectId={projectId}
Authorization: Bearer <token>
Create a rule
POST /api/v1/notifications/rules
Authorization: Bearer <token>
Content-Type: application/json
{
"projectId": "uuid",
"deviceId": "uuid",
"pin": 0,
"condition": "gt",
"threshold": 85,
"message": "Temperature too high: {value}°C",
"channels": ["inApp", "push", "email"]
}
Update a rule
PATCH /api/v1/notifications/rules/{ruleId}
Authorization: Bearer <token>
Delete a rule
DELETE /api/v1/notifications/rules/{ruleId}
Authorization: Bearer <token>
See the Alerts & Notifications guide for the full configuration walkthrough.