Update a preference set
Sets preferences within the given preference set. By default, this is a destructive operation and will replace any existing preferences with the preferences given. Use '__persistence_strategy': 'merge' to merge with existing preferences instead. If no object exists in the current environment for the given `:collection` and `:object_id`, Knock will create the object as part of this request. The preference set `:id` can be either `default` or a `tenant.id`. Learn more about [per-tenant preferences](/preferences/tenant-preferences).
Update a preference set
Sets preferences within the given preference set. By default, this is a destructive operation and will replace any existing preferences with the preferences given. Use '__persistence_strategy': 'merge' to merge with existing preferences instead. If no object exists in the current environment for the given :collection and :object_id, Knock will create the object as part of this request. The preference set :id can be either default or a tenant.id. Learn more about per-tenant preferences.
Endpoint
Rate limit
Tier 3Path parameters
Unique identifier for the object.
The collection this object belongs to.
Unique identifier for the preference set.
Request body
Controls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences.
An object where the key is the category and the values are the preference settings for that category.
An object where the key is the channel type and the values are the preference settings for that channel type.
An object where the key is the channel ID and the values are the preference settings for that channel ID.
Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
An object where the key is the workflow key and the values are the preference settings for that workflow.
Returns
A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.
An object where the key is the category and the values are the preference settings for that category.
An object where the key is the channel type and the values are the preference settings for that channel type.
An object where the key is the channel ID and the values are the preference settings for that channel ID.
Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
Unique identifier for the preference set.
An object where the key is the workflow key and the values are the preference settings for that workflow.