Create a notification preference

View as Markdown
Create a notification preference. The public path remains notification_preferences for compatibility; each row is id-addressable and applies one configuration (alert statuses, scope, notification targets) to one or more components. The settings apply equally to every component listed. To give a component different settings, create a separate preference. notifiedOn: array of alert statuses to notify on. Valid values: Critical, Warning, Resolved. If notifiedOn is empty or omitted, defaults to all three: [Critical, Warning, Resolved]. Channel config structures: - email: {"recipients": ["addr@example.com", ...]} (at least one required) - slack: {"recipients": ["channel@workspace.slack.com", ...]} (at least one required) - webhook: {"customerID": "cust-acme" (optional), "orgName": "0000000000000000" (optional), "webhookIDs": ["wh_abc123", ...]} (at least one webhook ID required; customerID defaults to the current customer when omitted; orgName is round-tripped for UI display only)

Request

Notification preference configuration
componentslist of stringsRequired

Components this preference applies to (e.g. GPU, CPU, NVLink, agent_liveness). At least one; all settings below apply equally to every listed component.

notificationTargetslist of objectsRequired

At least one notification target is required. Config structure depends on channel — see EmailNotificationConfig, SlackNotificationConfig, WebhookNotificationConfig.

activebooleanOptional

Active flag: when false, this preference is temporarily paused (other preferences covering the same component still fire). If omitted on create, defaults to true. If omitted on update, the existing value is preserved.

notifiedOnlist of stringsOptional

Alert statuses to notify on. Valid values: Critical, Warning, Resolved. If empty or omitted, defaults to all three: [Critical, Warning, Resolved].

scopeobjectOptional
Optional scope to narrow which nodes trigger notifications. If omitted or null, all nodes for this component trigger notifications.

Response

Created - returns the new preference id

idstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
499
Client Closed Request Error
500
Internal Server Error
503
Service Unavailable Error