A collection of methods related to the Email Subscriptions API
Methods
-
Get the email subscription status for an email address / portal ID combination (https://developers.hubspot.com/docs/methods/email/get_status)
Name Type Description email
string portalId
string Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.emailSubscriptions.getEmailSubscriptionStatus(email, 198273).then(response => console.log(response));
-
Update the email subscription status for an email address (https://developers.hubspot.com/docs/methods/email/update_status)
Name Type Description email
string opts
object Returns:
Type Description Promise Example
const hs = new HubspotClient(props); hs.emailSubscriptions.updateEmailSubscription(email, { unsubscribeFromAll: true}).then(response => console.log(response));