cancel
Showing results for 
Search instead for 
Did you mean: 

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

Occasional Contributor

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
CTCT Employee

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

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