Email Marketing Tool

carrng
Member

out out all from api

SOLVE

It seems like this should be straight forward, but I don't seem to find an endpoint that allows me to opt a contact out completely from the api.

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

out out all from api

SOLVE

Hey @carrng,

 

The following endpoint can be used to update an email address' subscription status. As you mentioned before, you can update specific subscriptions by including the subscription ID. However you can also opt the email address out of all email communication. To do that, the body of your request should look like this:

{
    "unsubscribeFromAll": true
}

https://developers.hubspot.com/docs/methods/email/update_status

View solution in original post

5 Replies 5
jennysowyrda
Community Manager
Community Manager

out out all from api

SOLVE

Hi @carrng,

 

Does this conversation from the developers forum speak to what you are looking to accomplish?

 

cc @Derek_Gervais

 

Thanks,
Jenny

0 Upvotes
carrng
Member

out out all from api

SOLVE

That works for opting a contact out of a specific subscription type with the provided ID. It doesn't allow for a complete unsubscribe. 

0 Upvotes
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

out out all from api

SOLVE

Hey @carrng,

 

The following endpoint can be used to update an email address' subscription status. As you mentioned before, you can update specific subscriptions by including the subscription ID. However you can also opt the email address out of all email communication. To do that, the body of your request should look like this:

{
    "unsubscribeFromAll": true
}

https://developers.hubspot.com/docs/methods/email/update_status

jennysowyrda
Community Manager
Community Manager

out out all from api

SOLVE

Thanks for the update @carrng!

 

@tjoyce do you have any suggestions for @carrng?

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

out out all from api

SOLVE

@carrng - I think you would have to use the subscription definitions endpoint and loop through those and store them in an array.

Then you can pass the array to this endpoint to unsubscribe.

 

I don't see a flag that can be set to just unsubscribe from all.