Docs
/
/

Preference center mAPI reference

Complete reference documentation for the Preference center resource.

Preference center

#

The preference center configuration controls the content and branding of Knock's hosted preference center for a given environment.

You can retrieve and update the configuration, or reset it to the built-in default content.

Get preference center configuration

#

Returns the preference center configuration for the given environment.

Endpoint

GET/v1/preference_center

Query parameters

environment
string

The environment slug.

Returns

The preference center configuration for a single environment.

config
object

The preference center configuration document.

enabled
boolean

Whether the preference center is enabled for recipients.

Upsert preference center configuration

#

Creates or updates the preference center configuration for the given environment.

Endpoint

PUT/v1/preference_center

Query parameters

environment
string

The environment slug.

Request body

config
object
Required

The preference center configuration document.

enabled
boolean

Whether the preference center is enabled for recipients.

Returns

The preference center configuration for a single environment.

config
object

The preference center configuration document.

enabled
boolean

Whether the preference center is enabled for recipients.

Reset preference center configuration to default

#

Resets the preference center configuration for the given environment to the built-in default content. The enabled flag is preserved.

Endpoint

PUT/v1/preference_center/reset

Query parameters

environment
string

The environment slug.

Returns

The preference center configuration for a single environment.

config
object

The preference center configuration document.

enabled
boolean

Whether the preference center is enabled for recipients.

New chat