Notification Channels
Engineer or admin CRUD for notification channels. Channels define how alert notifications are delivered (e.g., webhook, email, Slack).
Create Notification Channel
POST /api/v1/notifications/channels
Request body:
{
"name": "Slack Ops",
"channel_type": "slack",
"config": {
"webhook_url": "https://hooks.slack.com/services/...",
"channel": "#network-alerts"
},
"enabled": true
}
Validation:
name and channel_type are required; channel_type must be one of webhook, email, slack, teams, in_app (400 otherwise, on create and update)
enabled defaults to true if omitted; explicit false creates the channel disabled (note: there is no toggle endpoint for channels — re-enable via PUT)
config defaults to {} if omitted
Response: 201 Created
{
"id": "uuid",
"name": "Slack Ops",
"channel_type": "slack",
"config": {
"webhook_url": "https://hooks.slack.com/services/...",
"channel": "#network-alerts"
},
"enabled": true,
"created_by": "uuid",
"created_at": "2026-02-17T12:00:00Z",
"updated_at": "2026-02-17T12:00:00Z"
}
Error responses:
400 Bad Request -- Missing required fields or invalid request body
403 Forbidden -- Non-admin user
List Notification Channels
GET /api/v1/notifications/channels
List all notification channels.
Response: 200 OK
[
{
"id": "uuid",
"name": "Slack Ops",
"channel_type": "slack",
"config": { ... },
"enabled": true,
"created_by": "uuid",
"created_at": "2026-02-17T12:00:00Z",
"updated_at": "2026-02-17T12:00:00Z"
}
]
Update Notification Channel
PUT /api/v1/notifications/channels/{channelID}
Partial update of a notification channel. Uses read-merge-write -- only fields present in the request body are updated; other fields are preserved.
Request body (all fields optional):
{
"name": "Updated Channel Name",
"channel_type": "webhook",
"config": {"url": "https://example.com/webhook"},
"enabled": false
}
Response: 200 OK (updated notification channel object)
Error responses:
400 Bad Request -- Invalid request body
403 Forbidden -- Non-admin user
404 Not Found -- Channel does not exist
Delete Notification Channel
DELETE /api/v1/notifications/channels/{channelID}
Delete a notification channel.
Response: 204 No Content
Error responses:
403 Forbidden -- Non-admin user
500 Internal Server Error -- Database error
Test Notification Channel
POST /api/v1/notifications/channels/{channelID}/test
Send a test notification through the specified channel. Validates that the channel exists and its configuration is reachable.
Response: 200 OK
{
"status": "ok",
"message": "test notification would be sent"
}
Error responses:
403 Forbidden -- Non-admin user
404 Not Found -- Channel does not exist