What is it?
The Preference Link Generation endpoints allow you to generate secure URLs to the Manage Preferences and Unsubscribe pages for any contact in your HubSpot CRM.
Why does it matter?
You can generate a contact's specific HubSpot Preference Page to help contacts access and update their preferences; allow your contacts to manage their email preferences directly from account settings or other authenticated areas of your website without requiring them to re-enter their email or dig up a past marketing email.
How does it work?
We've added to our Subscriptions Public APIs v4 so that you can call the new POST /communication-preferences/v4/links/generate endpoint with a contact’s email (subscriberIdString), optional language, and (for unsubscribe single) a subscriptionId. You’ll receive secure, contact-specific links to:
- - Manage Preferences page
- - Unsubscribe from All page
- - Unsubscribe from a Single Subscription Type page
For more information on how it works refer to our Beta - Generate Preferences API documentation
Callouts
- - This API generates secure, contact-specific links. It’s your responsibility to ensure the authenticated end user is the rightful owner of the email address before showing or sending them the link. Never expose these links publicly or to unauthenticated users.
- - Each preference center URL is unique to each user; generated links provide access to modify subscription preferences for the specified email.
- - These links include a code for the language of the page the user will be shown (like "en" or "fr"). Links can be generated for any language you have configured for your subscription types.
- - Applicable for email only.
Who gets it?
Marketing Starter, Marketing Pro, Marketing Enterprise, Marketing+ Pro, Marketing+ Enterprise