Namespace: hs/emailSubscriptions

hs/emailSubscriptions

A collection of methods related to the Email Subscriptions API

Methods

hs/emailSubscriptions.getEmailSubscriptionStatus (email, portalId)Promise asyncstatic

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));

hs/emailSubscriptions.updateEmailSubscription (email, opts)Promise asyncstatic

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));