Using the API for multiple contact lists and accounts

Using the API for multiple contact lists and accounts


I am new to Constant Contact and want to set up a page using the API that allows me to let an individual select one or more lists to join.  However, these lists are in several different Accounts - so I am thinking that for each account I will need a different API key.  Can you let me know if this assumption is correct?

So for the sample below where bolded items are accounts, I would need to use 4 API keys (Healthy Hometown Account, District 9 Account, District25Account, &  District 18) to allow users to sign up or remove themselves from ALL of these groups on one page.

Here is a sample of the lists:

Healthy Hometown Account

Walking E-News

Bicycling Enews

Special Events E-news

District 9 Account


District 25 Account

Master District 25 Constituentlist







District 18 Account





The API key is used to identify a developer, it is not related to the end user accounts.  You can use the same API key for as many integrations or accounts using the same integration as you would like.  

Dave Berard
Senior Product Manager, Constant Contact

Hello louisvillemetro,

I am attempting to create a page similar to your own.  I want to list contact lists from different accounts on one page.  Have you had success creating this page?  Is there any code that you may be able to share?

Thanks in advance.

I need this similar setup. Any luck on this feature? I need to allow users to select from multiple lists that are across multiple accounts. Any help is greatly appreciated.

So the good news is that this is doable, unfortunately it's a little bit complicated due to security concerns and restrictions.


What you will need to do is first obtain access tokens for each of the accounts you want to access, and then make separate API calls to get the lists from each account.  Unfortunately, we cannot provide access across multiple accounts in a single API call.

You could then make the lists available via checkboxes as follows:


<input type="checkbox" name="list[1][1]" value="1" />
<input type="checkbox" name="list[1][2]" value="1" />
<input type="checkbox" name="list[2][3]" value="1" />
<input type="checkbox" name="list[2][4]" value="1" />



Where list would be the name of the field, the first array would be the account the list belongs to, and the third key would be the list id.

You could also do:

<input type="checkbox" name="list[]" value="1_1" />
<input type="checkbox" name="list[]" value="1_2" />
<input type="checkbox" name="list[]" value="2_3" />
<input type="checkbox" name="list[]" value="2_4" />



And parse the incoming data by exploding the string value.  Either way it requires a little bit of a work-around and then you will need to make again 2 calls back via the API, one for each account to add the users to that list.

I know it's a little bit of a pain, and probably not the answer you are looking for, but we have to keep the security of our users as our number one priority.

If you have any questions about implementing this, or there's anything I can do to help, just let me know.



Check out our developer portal:
Developer Portal

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

Visit Page