How to generate the unsubscribe link for a user?


We’d like to offer the “unsubscribe” (or “manage subscriptions”) link known from emails to our users in a web interface.

The link looks like this roughly, broken down by (trunkated) URL parameters:

How can I generate a valid link like this with the help of the API functions? Thanks.


Hi @marian

We don’t currently have a way to generate an unsubscribe URL for a contact. It’s something that we’re considering as something we’ll add in the future but there are no specific plans yet.


Thanks for your reply.

That’s a pitty. Together with the fact that it’s not possible to subscribe users to email types via the API (see Has anyone tried to build a custom email preference page?), this creates some pretty big user experience obstacles for us.


Hi @dadams ,

We are also looking forward to the option to either subscribe users to email types via API or else generate an unsubscribe URL.
Since this post was in Aug 2016, is there a chance that the feature to generate an unsubscribe link has been implementd in HubSpot by now?



Checking in on this in 2018. Has this functionality been added yet?


Hi @Dexter_Peters,

You can create a static user-agnostic unsubscribe link by taking your primary HubSpot email domain and adding the following at the end: /hs/manage-preferences/unsubscribe-simple


Hi Derek,

I know it's possible to generate an unsubscribe link, exactly the link that is generated on marketing emails, for users by doing the following:

Base64 encode this JSON document:
{"ea": ""}

Pass the encoded string to the ?d query param for our subscription page, this successfully loads the subscription preferences for

I was wondering if this is documented somewhere so we don't implement this in a way that might be changed in the future.



Hi @pablo.fierro.toptal,

That's intentionally undocumented; access to a contact's subscription management page is tightly controlled, and the mechanism is subject to change at any time. I'd advise against depending on that behavior going forward, since we use it internally and it's likely to change without notice.