How to opt a contact out of email via API by using C#


How to unsubscribe a contact by using HubSpot API in C#?



I too am interested in this information.



Hey all,

You can unsubscribe contacts using the ‘Update email subscription status’ endpoint below. Keep in mind that this cannot be reversed.


Hi Derek,
Does not seem like the unsubscribe API works as expected. I tried to unsubscribe a user using the below API. However, if I check the preferences, I see that the user is still subscribed. It worked yesterday for me.
Given below is the request:

User-Agent: Fiddler
Content-Length: 114
    "subscriptionStatuses": [
        "id": 1245662, "subscribed": false


The endpoint mentioned above is for specific subscription types. Sending a subscribed = false without a subscription ID returns an error. How does one do a general unsubscribe through the API?


Hi @carrng,

This can be done by sending "unsubscribeFromAll": true in the body, as outlined in the example.