---
title: "Bulk update user subscriptions"
method: POST
path: "/api/users/bulkUpdateSubscriptions"
tags: ["users"]
---

# Bulk update user subscriptions

`POST /api/users/bulkUpdateSubscriptions`

<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>.

## Request body

- BulkUpdateSubscriptionsRequest
  - `updateSubscriptionsRequests` UpdateSubscriptionsRequest[], required — List of UpdateSubscriptionsRequests to process
    - `campaignId` integer — Campaign to attribute unsubscribes
    - `email` string — 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>.
    - `emailListIds` integer[] — Lists that a user is subscribed to
    - `subscribedMessageTypeIds` integer[] — 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.
    - `templateId` integer — Template to attribute unsubscribes
    - `unsubscribedChannelIds` integer[] — Email channel ids to unsubscribe from
    - `unsubscribedMessageTypeIds` integer[] — Individual message type IDs to unsubscribe (does not impact channel subscriptions).
    - `userId` string — 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>.
    - `validateChannelAlignment` boolean — 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 `200`

successful operation

## Other responses

- `400` — Invalid parameters
- `401` — Invalid API key
- `409` — Email/userId conflict

---

[API](https://skmtc.net/iterable/apis/iterable-api.md) · [All operations](https://skmtc.net/iterable/apis/iterable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/iterable/iterable-api/revisions/afaab604b58c/schema)
