The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Get removed contacts

Occasional Contributor

Get removed contacts

I'm using this wrapper:


Is there way to get a list of removed contacts? 


Re: Get removed contacts



The best way to get a list of removed contacts in our API is to get a list of "list members" from the removed list.  Unfortunately, in the wrapper, when using the "getLists" function, it ignores the Active, Removed, and Do Not Mail lists.  So that when you do the getListMembers function, you cannot pick the removed list.


The work around to this would be to edit the Collections.php file and go to the getLists function, and take out the Removed list from the ignoreArray array.  Then when you do a getLists, it will show the removed list as list "0".  You would then be able to get the list members from that list.


After removing "removed" from the array, here is the code that I used that worked:


    include_once ("ConstantContact.php");
    $ConstantContact = new ConstantContact('basic', "API KEY", "USERNAME", "PASSWORD");
    $lists = $ConstantContact->getLists();
    $members = $ConstantContact->getListMembers($lists['lists'][0]);
    print_r ($members);


If you have any questions please let me know.




Ben Soder

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More