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.

Cannot Add Contacts to non-default list using API

Highlighted
New Member

Cannot Add Contacts to non-default list using API

Hi,


I have written some asp.net code to generate and send the XML required to add contacts.


The code allows the user to select the list they wish to add the user too.


This works fine for adding to the default list (1), with contacts being successfully added, but I cannot add contacts to the other lists I have created using the Constant Contact Manage Contacts tab, on the website.


Can you only add to the default list using the API or do you need to set queue permissions?


If so, why do you need to specify list number in the XML?


 


Thanks


Andrew Harvey


 


 

1 REPLY 1
Highlighted
Employee

Adding contacts to a list other than the default list

Hello Andrew,



You can definetly add a contact to lists other than the default list. In order to do this, when creating the XML, there is a section for contact lists:



<ContactLists>

<ContactList id="http://api.constantcontact.com/ws/customers/joesflowers/lists/1" />

</ContactLists>



In order to add contacts to other lists, you need to get the other lists ListID, which you can get by doing a GET call on the List Collection API and then you can add as many lists as you like between the ContactLists node in the XML.



The default list is not always list ID 1, it just happens to start out that way. The list ID that you specify in the XML is seperate from anything in the user interface of Constant Contact. If you have any questions regarding this please let me know.



Regards,

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
Featured