Alerts API
Base URL: https://app.kvmfleet.io/v1
List alert rules
curl https://app.kvmfleet.io/v1/alerts/rules \
-H "Authorization: Bearer $TOKEN"
{
"rules": [
{
"id": "rule_abc123",
"event_type": "device.offline",
"sink_type": "webhook",
"sink_config": {"url": "https://hooks.slack.com/services/T.../B.../xxx"},
"enabled": true,
"created_at": "2026-03-01T10:00:00Z"
}
]
}
Create a rule
curl -X POST https://app.kvmfleet.io/v1/alerts/rules \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"event_type": "device.offline",
"sink_type": "webhook",
"sink_config": {"url": "https://hooks.slack.com/services/T.../B.../xxx"}
}'
Required role: admin or owner
Event types
| Event |
Description |
device.offline |
Device missed 3 heartbeats |
login.failed |
Failed login attempt |
Sink types
| Sink |
sink_config fields |
webhook |
url (required) |
email |
address (required) |
Update a rule
curl -X PATCH https://app.kvmfleet.io/v1/alerts/rules/rule_abc123 \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'
Delete a rule
curl -X DELETE https://app.kvmfleet.io/v1/alerts/rules/rule_abc123 \
-H "Authorization: Bearer $TOKEN"
Alert history
curl "https://app.kvmfleet.io/v1/alerts/history?limit=50" \
-H "Authorization: Bearer $TOKEN"
{
"alerts": [
{
"id": "alrt_xyz789",
"rule_id": "rule_abc123",
"event_type": "device.offline",
"device_id": "dev_abc123",
"device_name": "DC1-R3-S7",
"fired_at": "2026-04-15T14:32:00Z",
"sink_type": "webhook",
"delivery_status": "delivered"
}
]
}
Query parameters
| Param |
Description |
limit |
Max entries (default 50) |
offset |
Pagination offset |
event_type |
Filter by event type |
start / end |
Date range filter |