Get subscription status for multiple emails using a single API request


#1

Hi, could you please help me with the following issue. I’m trying to get all email addresses for a given portal by subscription status. For example, get email addresses which have “status”: “unsubscribed”. The Email API provides a special endpoint to get email subscription status, but this method works only for a single email address. Is it possible to get subscription status for multiple email addresses using a single API request?

Thanks


API allcontacts not showing Unsubscribe or Bounce information
#2

Hi @dmytro

Currently the API only supports getting the subscription details for a single email at a time. As an alternative to using the Email API, you can use the Contacts API to get the contact properties for multiple email addresses in a single request, and look at the hs_email_optout to get the status of the contact (if that property is true, the contact is opted out of email). You’ll also have other hs_email_optout_[subscription id] properties for each subscription type you have set up that indicates the contact’s subscription status for individual subscription types.


API allcontacts not showing Unsubscribe or Bounce information