Users
Preference center

Get preference center config

Returns the preference center config with environment metadata for the given user.

get/v1/users/{user_id}/preference_center/config

Path parameters

user_idstring required

The unique identifier of the user.

Response

OK

account_namestring nullable required

The name of the account that the preference center is associated with.

enabledboolean required

Whether the preference center is enabled for this environment.

knock_branding_requiredboolean

Whether Knock branding is required in the preference center.

user_emailstring nullable required

A display label for the user that the preference center is associated with, resolved as email, then user id.

Example response

{
  "account_name": "Acme Inc.",
  "branding": {
    "dark": {
      "icon_url": "https://example.com/icon-dark.png",
      "logo_url": "https://example.com/logo-dark.png",
      "primary_color": "#C02727",
      "primary_color_contrast": "#11E2EC"
    },
    "icon_url": "https://example.com/icon.png",
    "logo_url": "https://example.com/logo.png",
    "primary_color": "#0EA5E9",
    "primary_color_contrast": "#0F172A"
  },
  "config": {
    "body": "Choose which notifications you want to receive.",
    "rows": [
      {
        "channel_types": [],
        "description": "Opt out of receiving comment and reply notifications",
        "identifier": "comments",
        "name": "Comments and replies",
        "type": "category"
      },
      {
        "channel_types": [
          "email",
          "sms"
        ],
        "description": "Receive notifications from the following channel types",
        "name": "Channel Types",
        "type": "channel_types"
      }
    ],
    "show_account_name": true,
    "title": "Notification preferences"
  },
  "enabled": true,
  "knock_branding_required": false,
  "user_email": "user@example.com"
}

Changes