latestSwagger 2.02026-08-10148196271.0 KB

afaab604b58c

users

Update user subscriptions

Updates user subscriptions. <b>IMPORTANT</b>: This endpoint overwrites (does not merge) existing data for any non-<code>null</code> fields specified in the request.<br/><br/>Learn about <a href="https://support.iterable.com/hc/articles/29156459027348">identifying users by <code>userId</code> and <code>email</code></a>.

post/api/users/updateSubscriptions

Request body

campaignIdinteger

Campaign to attribute unsubscribes

emailstring

An email address that identifies a user profile in Iterable. For each user in your request, provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.

emailListIdsinteger[]

Lists that a user is subscribed to

subscribedMessageTypeIdsinteger[]

Individual message type IDs to subscribe (does not impact channel subscriptions). To set a value for this field, first have your CSM enable the opt-in message types feature. Otherwise, attempting to set this field causes an error.

templateIdinteger

Template to attribute unsubscribes

unsubscribedChannelIdsinteger[]

Email channel ids to unsubscribe from

unsubscribedMessageTypeIdsinteger[]

Individual message type IDs to unsubscribe (does not impact channel subscriptions).

userIdstring

A user ID that identifies a user profile in Iterable. For each user in your request, provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.

validateChannelAlignmentboolean

Defaults to <code>true</code> (validation enabled). When <code>false</code>, allows subscribing users to message types that belong to unsubscribed channels. By default, Iterable validates that subscribed message types belong to subscribed channels. Setting this to <code>false</code> bypasses this validation, allowing you to save message type preferences even when the parent channel is unsubscribed. Users won't receive messages from these types while the channel remains unsubscribed, but their preferences are preserved for when the channel becomes subscribed.

Response

successful operation