Create a notification preference
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
Components this preference applies to (e.g. GPU, CPU, NVLink). At least one; all settings below apply equally to every listed component.
At least one notification target is required. Config structure depends on channel — see EmailNotificationConfig, SlackNotificationConfig, WebhookNotificationConfig.
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.
Alert statuses to notify on. Valid values: Critical, Warning, Resolved. If empty or omitted, defaults to all three: [Critical, Warning, Resolved].
Response
Created - returns the new preference id