Last modified: September 3, 2025
Subscription types represent the lawful basis to communicate with your contacts through email. Contacts can manage their email preferences so they’re only opted in to emails they want to receive. The v4 subscriptions APIs allow you to programmatically subscribe or unsubscribe contacts from your email subscription types, or unsubscribe a contact from all email communication. These APIs also provide support for the Brands add-on.
Scope requirements
The following scopes are required to use the v4 subscription API endpoints, based on the endpoint you’re using:communication_preferences.read: provides access to fetch subscription type definitions and subscription preferences for a contact.communication_preferences.write: provides access to update subscription preferences for a contact.communication_preferences.read_write: provides access to both fetch and update subscription preferences for a contact and fetch all subscription definitions in your account.
communication_preferences.statuses.batch.read: provides access to fetch subscription statuses in bulk.communication_preferences.statuses.batch.write: provides access to manage and update subscription statuses in bulk.
Get all subscription types
To get a list of all email subscription types in your account, make aGET request to /communication-preferences/v4/definitions.
If you have the Brands add-on, you can filter subscription types by brand by including the businessUnitId as a query parameter in your request. The default Account brand will always use "businessUnitId": 0.
The subscription types will be returned within the results field of the response.
includeTranslations=true query parameter in your request to retrieve any subscription translations associated with each definition.
For example, if you made a GET request to /communication-preferences/v4/definitions?includeTranslations=true, the response would resemble the following:
Get subscription preferences for a specific contact
To get the current subscription preferences for a specific contact, make aGET request to /communication-preferences/v4/statuses/{subscriberIdString}?channel=EMAIL where the subscriberIdString is the email address of the contact.
For example, to get the subscription preferences for a contact with an email address of jdoe@example.com, you’d make a GET request to /preferences/v4/statuses/jdoe@example.com?channel=EMAIL.
The response will include a full list of the current subscription preferences for the contact in the results field. An example response is included below:
status for a subscription type:
SUBSCRIBED: contact opted into the subscription type.UNSUBSCRIBED: contact opted out of the subscription type.NOT_SPECIFIED: contact hasn’t provided opt-in preference for the subscription type.
Get contacts who unsubscribed from all email communications
Contacts can also opt out of all email communications from your business. To get a list of all contacts who are currently opted out of all email subscription types, make aPOST request to /communication-preferences/v4/statuses/batch/unsubscribe-all/read.
If you have the Brands add-on, you’ll see the wideStatusType: "BUSINESS_UNIT_WIDE" field in the response. Note that the default Account brand will always use "businessUnitId": 0.
Get a specific contact who unsubscribed from all email communications
To check whether a specific contact is unsubscribed from all email subscription types, make aGET request to /communication-preferences/v4/statuses/{subscriberIdString}/unsubscribe-all, where the subscriberIdString is the email address of the contact.
If you have the Brands add-on, you’ll see the wideStatusType: "BUSINESS_UNIT_WIDE" field in the response. Note that the default Account brand will always use "businessUnitId": 0.
For example, to check whether a contact with an email address of jdoe@example.com has opted out of all email communications, you’d make a GET request to /communication-preferences/v4/statuses/jdoe@example.com/unsubscribe-all.
Update subscription preferences for a specific contact
To update the subscription preferences for a contact, make aPOST request to /communication-preferences/v4/statuses/{subscriberIdString}, where the subscriberIdString is the email address of the contact. In the request body, you’ll need to include the fields listed the table below:
| Parameter | Type | Description |
|---|---|---|
subscriptionId | Number | The internal ID of the subscription type. You can get a full list of subscription IDs by making a GET request to /communication-preferences/v4/statuses/{subscriberIdString}. |
statusState | string | The opt-in or opt-out state that you want to update the contact’s subscription to. The possible values are SUBSCRIBED, UNSUBSCRIBED, or NOT_SPECIFIED. |
legalBasis | string | The legal reason for changing the subscriber’s status. If you data privacy settings turned on, this field is required, along with the legalBasisExplanation field. |
legalBasisExplanation | string | An explanation for the legal basis you provided for updating the subscriber status. |
channel | string | The channel type for the subscription type. Currently, the only supported channel type is EMAIL. |
39644612. You can fetch a list of all subscription types available to get their IDs by making a GET request to /communication-preferences/v4/definitions.
Update a contact’s “Opted out of all email” status
To unsubscribe a contact from all email communication in an account or specific business unit (i.e., “Opted out of all”), make aPOST request to /communications-preferences/v4/statuses/{subscriberIdString}/unsubscribe-all, where the subscriberIdString is the email address of the contact.
- If you have the Brands add-on, you’ll also need to include the
businessUnitIdquery parameter in your request. Note that the Account brand will always use"businessUnitId": 0. - You can optionally include the
verbosequery parameter to include the details of the updated subscription statuses the contact has unsubscribed from in the response. If you don’t use theverbosequery parameter, the resulting response will be empty.
POST request, the contact will be unsubscribed from all email communication from your account. If you have the Brands add-on, the contact will be unsubscribed from all email from the brand specified in your request, but will still be eligible to receive email from other brands in your account.
Using batch subscription endpoints
If you have an Marketing Hub Enterprise account, you can use the bulk subscription endpoints detailed below to fetch and manage subscription statuses for multiple contacts in a single API request.Get “Opted out of all communication” subscription status for a list of contacts
To get a list of the Opted out of all communication statuses for multiple contacts across an account or for a specific business unit, you can make aPOST request to /communication-preferences/v4/statuses/batch/unsubscribe-all/read, and provide the following query parameters:
businessUnitId: if you have the Brands add-on, you can include this parameter to specify which business unit your contacts will be opted out of all subscription types from. If you don’t provide this query parameter in the URL of your request, then all statuses for the account will be returned across all brands.channel: the communication type to unsubscribe all contacts out of. Currently, the only the supported channel isEMAIL.
inputs field:
POST request to /communication-preferences/v4/statuses/batch/unsubscribe-all/read?channel=EMAIL, the resulting response would resemble the following:
Get specific subscription statuses for multiple contacts
To get the subscription statuses of multiple contacts in an account or for a specific business unit, make aPOST request to /communication-preferences/v4/statuses/batch/read. If you have the Brands add-on, you can include the businessUnitId query parameter to specify which brand your contacts will be opted out of all subscription types from.
In the body of your request, provide a list of the email addresses for the associated contacts you want to opted out of all email communications using the inputs field:
POST request to /communication-preferences/v4/statuses/batch/read?channel=EMAIL, the resulting response would resemble the following:
Update the “Opted out of all email” status for multiple contacts
To unsubscribe multiple contacts from all subscription types in an account or for a specific business unit, make aPOST request to /communication-preferences/v4/statuses/batch/unsubscribe-all, and provide the following query parameters in your request:
businessUnitId: if you have the Brands add-on, you can include this parameter to specify which brand your contacts will be opted out of all subscription types from.channel: the communication type to unsubscribe all contacts out of. Currently, the only the supported channel isEMAIL.verbose: an optional boolean value that controls if the endpoint returns all the subscriptions that were impacted for all contacts.
inputs field:
POST request to /communication-preferences/v4/statuses/batch/unsubscribe-all?channel=EMAIL&verbose=true, the resulting response would resemble the following:
Unsubscribe multiple contacts from specific subscription types
To update the specific subscription types of multiple contacts in an account or for a specific business unit, make aPOST request to /communication-preferences/v4/statuses/batch/write, and provide the details of the subscription updates in the inputs field in the body of your request. For example, the following request body would subscribe the contact with an email address of test@hubspot.com to the subscription with an ID of 123: