I have list of email addresses come from a CRM system that need to be moved to Do Not Email. I have tried using bulk ADD_CONTACTS to "Do Not Mail" but fails with Bad value(s) for parameter 'lists' error.
I know I can get contact id for each email address then opt out the contact using http://community.constantcontact.com/t5/Documentation/Opting-out-a-Contact/ba-p/25117. But I wonder if there is other alternative to do it.
Does Constant Contact API have bulk operation for opting out email addresses?
In product, we do offer a way to import a list of Contacts to a contact list and then move that same list to Do Not Mail in bulk. I do not believe that this is currently exposed through our Bulk API. If it is, we have no documentation anywhere pointing that out.
I'm going to check with our engineering group to see if it is possible and if it's a documentation oversite or if this would need to be an enhancement.
As of now, the only option I can think of is to do one of these two (fairly resource intensive) options:
1. Loop through all the contacts doing a POST request to create them and then do a DELETE request to move them to Do Not Mail
2. Do a Bulk Import to create all the contacts than loop through doing a query by 50 emails at a time and then 50 DELETE requests (50 email queries is the most we can process in one request)
Second option is probably the faster and less resource intensive option, though it does require creating a bulk import.
If this is a one off option, the fastest way is in account. If this is going to be used in one of your plugins, we'll probably need to talk with engineering about how we can expose that functionality through the Bulk Activities API.