We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Problem with updating a Removed Contact.

Home & Building Services

Problem with updating a Removed Contact.

Scenario 1 (Works as expected):  Have a "Removed" contact.  I update the email address and Name.  The contact updates as expected and stays as "Removed" status.


Scenario 2 (Works as expected): Have a "Removed" contact.  I do not update the email but I do add them to a contact list.  This makes them active as expected.


Scenario 3 (Does not work as expected):  Have a "Removed" contact.  I modify the email address and also select a contact list.  I expect it to update the email on this contact and make it active.  However it creates a whole new contact with the new email address. 


This problem is consistent with the GUI and within the API using UpdateContactFullForm.


Please let me know if this is how it will always work so I have to account for it or is this a bug?




I'm not able to replicate what you're seeing.  In the UI, I removed a contact from all lists, updated their email address, and then added the updated email address to lists.  I confirmed with the API that I am ending up with the unique contact ID for them that I started with (a new contact record isn't being created).  I did a GET for both the starting email address at the beginning of the process and for the updated email address after updating (confirming the unique contact ID was the same for both).  As you would expect, if I then do a GET for the original email address, the system does not find it.  


For the API, you are essentially doing the same thing--GETting the contact from us by searching for their email address or unique contact ID if you store that, then using the update function to change their email address, which PUTs back the contact with changes based on the unique contact ID.  Your code should be different to create a new contact than to update an existing one (creating uses the POST method, while updating uses the PUT function).  I use the following code to decide whether to create or update a contact.



session_start ();
require_once 'ConstantContact.php';
require_once 'config.php';

$ConstantContact = new ConstantContact("oauth2", $apiKey, $username, $accessToken);

// Get potential contact lists
$lists = $ConstantContact->getLists();
// Lists are returned in multidimentional arrays 0 being the list, and 1 being the next50

// Email address here is used for testing purposes
/* NOTE:  This email address will be added to your account if you execute this script, you should send this to do-not-mail after your testing */

$emailAddress = "testemail10312012@test.com";

// Search for our new Email address
$search = $ConstantContact->searchContactsByEmail($emailAddress);
echo $emailAddress . "<br>";
//echo $ContactsCollection->searchContactsByEmail($ext);

// If the search didnt return a contact object
if($search == false)
	// Create a new Contact Object to store data into
	$contactObj = new Contact();
	// Adding multiple lists to this new Contact Object
	$contactObj->lists = array($lists['lists'][0]->id, $lists['lists'][18]->id);
	// Set the email address
	$contactObj->emailAddress = $emailAddress;
	// Create the Contact and DONE
	$Contact = $ConstantContact->addContact($contactObj);
	echo ("Contact added.");

} // Otherwise we update our existing
	// Gather data from our previous search and store it into a data type
	$contactObj = $ConstantContact->getContactDetails($search[0]);

	// We need to get the old list and add a new list to it as
	// this request requires a PUT and will remove the lists
	// as they are stored in an array
	 array_push($contactObj->lists, $lists['lists'][18]->id );
	// Update the contact and DONE
	$UpdateContact = $ConstantContact->updateContact($contactObj);
	echo ("Contact updated.");




This is a long answer to your question, but the answer is that I can't replicate scenario 3, but it should work as you would expect (updating an existing contact).


Best Regards,

Shannon W.

API Support Specialist

Home & Building Services

It still does as I specified.  Maybe I'm doing something wrong.


I have a contact with the following information:


Id: 20908

Email: test@test.com

FirstName: First

LastName: Last

Status: Removed (Not in any list)


Here is my update code:


Dim contact As New Contact()

contact = Utility.GetContactDetailsById(AuthenticationData, "20908")


contact.Status = ContactStatus.Active

contact.EmailAddress = "test1@test.com"

contact.FirstName = "First1"

contact.LastName = "Last1"

contact.OptInSource = ContactOptSource.ActionByCustomer



Dim contactOptInList As New ContactOptInList()

contactOptInList.ContactList = New ContactList("1")



Utility.UpdateContactFullForm(AuthenticationData, contact)


This does nothing to the 20908 record and creates a new record with the update information.



I was able to reproduce the issue with the code that you provided; thank you.  I have made our engineering team aware of this so that they can look into it.  We don't have an estimated time this might be fixed, but in the meantime, the workaround would be to update the contact to active and update the lists, update contact full form, and then change the email address in a second step (then update full form again).  Sorry for the inconvenience, and thank you for bringing this our attention!


Best Regards,

Shannon W.

API Support Specialist

I'm having a similar problem.


Using the gui - I deleted a contact.  - action by owner

Using the api - I looked up the contact and there status is REMOVED with action by owner


Using the gui - I added the user - action by owner.

using the API - looked up the contact and their status still reads REMOVED.


I contacted support and they told me the status for the email is ACTIVE.


So why when using the API does that return status = REMOVED?


I do see in the json results the following:



Is there some sort of lag time between the GUI and the API?








Hi Charles,


API returns the following status values:


Active - Contact is on one or more email lists, has not unsubscribed and has not been deleted through the web UI

Removed - Contact is not on any email lists, has not unsubscribed, may or may not have been deleted through the web UI

Unsubscribed - Contact has unsubscribed from all email marketing messages for this account, is no longer on any email lists, may or may not be deleted through the web UI

Awaiting Confirmation - Contact has not confirmed their email address through our Confirmed Opt In feature (off by default)


Hope this clears things up

Dave Berard
Senior Product Manager, Constant Contact

Kind of


The contact was listed in the GUI and could be sent email (GUI tech support said the contact was Active).


When looking the user up via the API, the contacts status read Removed.


After Posting an add request, the system said the User Already Exists.


I found that I could update the contact by issuing a PUT request, but then not really sure what to make of "REMOVED" status.


So it's a bit wonky, but did figure it out.  Thanks.

Developer Portal

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

Visit Page