With multiple accounts how to have an unified opt-out list?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Hello everyone. I have multiple accounts for multiple users and each of them will be sending emails to an audience. I've seen also that each of them have their own opt-out list. The problem I'm having is that I need a way to get all the opt-outs from every account, downloading the list manually for each account would be a very tedious process since there are many of them. Is there a way to export or download all the opt-outs of all the accounts with just one action?
As a last resource I was thinking of making a script to pull each list from each account but I don't know if the API supports this.

Thank you!
Photo of Andrea Tupini

Andrea Tupini

  • 12 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 0
  • 1
Photo of Kyle Gregory | Lipscomb University

Kyle Gregory | Lipscomb University, Champion

  • 99 Posts
  • 69 Reply Likes
Official Response
Hey @Andrea Tupini,

You can use the API for this information. I guess there are two ways to go about this:

1. GET /#account_id/members
This members endpoint will enumerate all the members in an account. You can filter them in your code by their "member_status_id" of "o" = optout. Note, you'll need to support paging in your code, as you're likely to have more than 500 members in each account.

2. GET /#account_id/response/#mailing_id/optouts
This mailing endpoint will give you information on those that have opted out of your mailings by a certain mailing's response information. Obviously you're going to need to know the mailing identifier(s) for each account's mailing(s) to be able to use this one effectively.

P.S. You'll need the API keys and account information (located in settings or accounts, depending on your Emma account type) for each account, and you'll just have your script call the endpoint for each account you want to process. 

Hope that helps,