Skip to main content

Notifications API


List notifications

GET /api/v1/notifications
Authorization: Bearer <token>

Query params:

ParamTypeDescription
projectIdUUIDFilter by project
deviceIdUUIDFilter by device
typestringthreshold | device_status | no_data
unreadbooleantrue = only unread
limitnumberMax results (default: 20)
pagenumberPage 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.