Between 9pm - 11pm ET this Sat (9/18), we will be doing routine network maintenance. Please avoid usage of our API during this time frame - including any scheduled sync jobs. Thank you in advance for your patience.

Get list of all contacts with status 'DoNotMail' for an account

NabTestA
Regular Participant

Get list of all contacts with status 'DoNotMail' for an account

Hi 

 

I am generating a report that gets the list of contacts that have the status 'DoNotMail' for accounts.

Currently I am using the C# api to get list of all contacts for an account and checking each contact if thier status is "DoNotMail". Considering accounts that have large number of contacts this is a time consuming task.

Is the any way to get the list of such contacts('DoNotDisturb') with a single API call?

 

Thanks,

Nabeel

 

1 REPLY 1
Shannon_W
Employee

Hi Nabeel,

 

You can get your list of Do Not Mail contacts by making a GET call to your do not mail list.  This is the URI you want to use:

 

https://api.constantcontact.com/ws/customers/username/lists/do-not-mail/members

 

You will get the first 50 contacts, and be provided with a "next" link to the next 50 contacts in do not mail, until there are no more.  We can only provide 50 contacts at a time with the GET request.  Otherwise you could bulk export your Do Not Mail contacts as a CSV or XLS.

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

View API documentation, code samples, get your API key.

Visit Page