Docs
/
/

Bulk set preferences

Bulk sets the preferences for up to 1,000 users at a time. The preference set `:id` can be either `default` or a `tenant.id`. Learn more about [per-tenant preferences](/preferences/tenant-preferences). Note that this is a destructive operation and will replace any existing users' preferences with the preferences sent.

Bulk set preferences

Bulk sets the preferences for up to 1,000 users at a time. The preference set :id can be either default or a tenant.id. Learn more about per-tenant preferences. Note that this is a destructive operation and will replace any existing users' preferences with the preferences sent.

Endpoint

POST/v1/users/bulk/preferences

Rate limit

Tier 1

Request body

preferencesRequired

A request to set a preference set for a recipient.

__persistence_strategy__
enum(string)

Controls how the preference set is persisted. 'replace' will completely replace the preference set, 'merge' will merge with existing preferences.

mergereplace
categories
PreferenceSetRequestCategories

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.

channels
PreferenceSetChannels

An object where the key is the channel ID and the values are the preference settings for that channel ID.

commercial_subscribed
boolean

Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.

workflows
PreferenceSetRequestWorkflows

An object where the key is the workflow key and the values are the preference settings for that workflow.

user_ids
string[]
Required

A list of user IDs.

Returns

A bulk operation entity.

__typename
string

The typename of the schema.

completed_at
string(date-time)

Timestamp when the bulk operation was completed.

error_count
integer

The number of failed operations.

error_items
object[]

A list of items that failed to be processed.

collection
string

The collection this object belongs to.

id
string
Required

Unique identifier for the object.

estimated_total_rows
integer

The estimated total number of rows to process.

failed_at
string(date-time)

Timestamp when the bulk operation failed.

id
string(uuid)

Unique identifier for the bulk operation.

inserted_at
string(date-time)

Timestamp when the resource was created.

name
string

The name of the bulk operation.

processed_rows
integer

The number of rows processed so far.

progress_path
string(uri)

The URI to the bulk operation's progress.

started_at
string(date-time)

Timestamp when the bulk operation was started.

status
enum(string)

The status of the bulk operation.

queuedprocessingcompletedfailed
success_count
integer

The number of successful operations.

updated_at
string(date-time)

The timestamp when the resource was last updated.

New chat