Setting contact status via API

Frequent Participant

Setting contact status via API

It appears that ANY update to a contact via the API sets their status to active. I have tried this with a loaded <ContactList> and with an empty <ContactList> and regardless the contact is set to active. I have changed the status to removed via the console then run this and it goes back to active. I doubt it makes a difference but I'm using Coldfusion.


<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="">
	<title type="text"> </title>
	<summary type="text">Contact</summary>
	<content type="application/vnd.ctct+xml">
		<Contact xmlns="">
				<ContactList id=""/>





Frequent Participant

Further investigation makes it seem like the real problem is that the BP UI is slow to catch up with changes made via the API. I am now getting consistent results from the API but they are not refleceted in the contact UI.




Which status where you trying to change it to?  If you are sending the changed status with an active contact list it would send it back to active.  If you were changing it to do not mail, then  you would just do a delete, instead of a PUT.

Ryan Davis
Quality Engineer
Frequent Participant

At the moment I'm trying to flip them back and forth between active and removed for a given list. It seems to be working but the portal UI seems to be slow to see the updates. Not important now that I have figured that out.

When you view a list in our Constant Contact UI, the list is cached on the server to improve performance.  Typically, the caching lasts only 5-10 minutes and you would not notice these types of "delays".  If you are looking for the data update to reflect immediately, you can log out of your account and back in after the API update.  This should clear the server cache since your session will end when you click Log Out.


Hope this helps.

Dave Berard
Senior Product Manager, Constant Contact
Frequent Participant

Thanks, that is what I had surmised and it makes total sense. As long as my API calls reflect the last status set I'm fine.




Regular Participant

Hi Ryan,


I can able to sync the "DonotMail" contacts from Constant contact to Salesforce Object using API.

While working with this api call, i can get only the contacts which are available in "DonotMail" list.


My Question is,

How Can we retrieve the Active Contacts using   API?





Active contacts are available through a similar system list as Do Not Mail:{username}/lists/active

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page