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:

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:

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:

Delete Notification Channel

DELETE /api/v1/notifications/channels/{channelID}

Delete a notification channel.

Response: 204 No Content

Error responses:

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: