Notifications

Update a member's notification settings

Changed on

Disclaimer: This beta endpoint is evolving; the API contract may change. <br /><br /> Sets the notification settings an organization member has explicitly chosen. Each rule names notification types, resources and channels, and applies one effect to every combination of them. A notification type no rule names keeps the setting it had, so this endpoint never has to carry a member's whole configuration. Three effects: 'enabled' and 'disabled' store an explicit choice, and 'inherit' removes the stored setting so the notification follows the platform default again. Sending the same body twice changes nothing the second time. The request either applies completely or changes nothing: a rule naming a notification type that does not exist, that the member cannot configure, or a resource the caller cannot access is rejected whole, as is a request that names the same type, resource and channel twice. A request carries at most 100 rules, addressing at most 1000 settings in total.

patch/v1/organizations/{organizationId}/members/{userId}/notificationSettings

Request

  • Base URL
    https://api.clickhouse.cloud
  • Auth
    HTTP basic

Path parameters

organizationId, string uuid required

ID of the organization the member belongs to.

userId, string uuid required

ID of the member whose settings are updated.

Request body

MemberNotificationSettingsPatchRequest required
rules, NotificationSettingRule[] required

Rules to apply. Every rule is applied, in the order given.

Example request

{
  "rules": [
    {
      "effect": "enabled",
      "notifications": [
        "service_backup_failed"
      ],
      "channels": [
        "ui",
        "email"
      ]
    }
  ]
}

Response

Successful response

object required
status, number

HTTP status code.

requestId, string uuid

Unique id assigned to every request. UUIDv4

result, MemberNotificationSettingsPatchResponse

Example response

{
  "status": 200,
  "result": {
    "settings": [
      {
        "type": "service_backup_failed",
        "resourceType": "service",
        "channelType": "email",
        "effect": "disabled"
      }
    ]
  }
}

Changes