APIs & Integrations

lynton
Contributor | Elite Partner
Contributor | Elite Partner

Getting Opt Out events from the Email Events API

We need to know which email caused a contact to unsubscribe. We're expecting this data to be available in the Email Events API: https://legacydocs.hubspot.com/docs/methods/email/get_events

 

I'm seeing an email event type of 'STATUSCHANGE' which I'd assume means the person changed their opt-out status. However, the data doesn't seem to line up. For example, a contact who opted out 6 months ago has a STATUSCHANGE event from this month. I also see many instances of multiple STATUSCHANGE events for the same contact over a period of time.

 

Is there any way to fetch the opt-out event data that's associated to each campaign from the Email Events API?

2 Replies 2
WendyGoh
HubSpot Employee
HubSpot Employee

Getting Opt Out events from the Email Events API

Hey @lynton,

 

A STATUSCHANGE event type means that the recipient changed their email subscriptions in some way. 

 

A status change can be for any list(s) and not just for the associated current email message. 

 

Looking into the STATUSCHANGE event, you should be able to deduce further information such as: the source, requestedBy, portalSubscriptionStatus, subscriptions and bounced. 

 

As such, looking at the STATUSCHANGE event is probably the best way to fetch opt out event on the email events API. 

 

Additionally, you can learn more here.

0 Upvotes
lynton
Contributor | Elite Partner
Contributor | Elite Partner

Getting Opt Out events from the Email Events API

@WendyGoh Thanks for your reply. We're confused because we're seeing many instances of STATUSCHANGE events months after the contact's "Unsubscribed from all email" date. How could a contact change their email subscription status after they've already unsubscribed from email? Also, because a contact can have many STATUSCHANGE events, how should we deduce which event caused a global opt-out?

0 Upvotes