Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Update a member's notification settings

PATCH/v1/organizations/{organizationId}/members/{userId}/notificationSettings
API playground

Disclaimer: This beta endpoint is evolving; the API contract may change.

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.

Permission

The API key must have the control-plane:organization:manage-notification-settings permission.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the organization the member belongs to.

    format: uuid
  • userIdstringrequired

    ID of the member whose settings are updated.

    format: uuid

Request bodyJSON

  • rulesarray ofobjectrequired

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

    4 properties
    • effectstringrequired

      What the rule does to the settings it names. One of 'enabled', 'disabled', 'inherit'. 'inherit' removes the setting, so the notification follows the platform default for the member's role again, whoever set it.

      Example: "enabled"
    • notificationsarray ofstringrequired

      Notification types the rule applies to, named as in List notification types.

      Example: ["service_backup_failed"]
    • resourcesarray ofstringrequired

      IDs of the resources the rule applies to, of the kind each notification type reports as its resourceType. Name every ID: there are no wildcards, and a rule covers no resource created afterwards. Notification types that apply to the organization itself, such as billing, take the organization ID.

    • channelsoptionalarray ofstring

      Delivery channels the rule applies to. One of 'ui', 'email'. Omit to apply the rule to every channel.

      Example: ["ui","email"]

Response

JSON

200

Successful response

JSON
  • statusoptionalnumber

    HTTP status code.

    Example: 200
  • requestIdoptionalstring

    Unique id assigned to every request. UUIDv4

    format: uuid
  • resultoptionalobject
    1 properties
    • settingsarray ofobjectrequired

      The member's settings for what the request addressed, after the change. A setting the request set to 'inherit' is absent, because it no longer exists.

      5 properties
      • typestringrequired

        Notification type the setting applies to, named as in List notification types. New types are added over time, so treat this as an open set.

        Example: "service_backup_failed"
      • resourceTypestringrequired

        Kind of resource resourceId identifies. Current values: service, organization, clickpipe, postgres. New values may be added over time. List notification types reports the same value for every notification of a given type.

        Example: "service"
      • resourceIdstringrequired

        ID of the resource the setting applies to, of the kind resourceType gives. Settings that apply to the organization itself, such as billing notifications, carry the organization ID.

      • channelTypestringrequired

        Delivery channel the setting applies to. One of 'ui', 'email'.

        Example: "email"
      • effectstringrequired

        Whether the member receives this notification on this channel for this resource. One of 'enabled', 'disabled'.

        Example: "disabled"