Error when removing contact from last list


Error when removing contact from last list

 I want to remove a contact from a list - even if it's the last list, but I don't want to opt-out the contact. This comes from someone hitting a newsletter "unsubscribe" button on the website.

So the documentation says:

To remove a contact from all lists, you need to start with the contact's detail data and simply remove all of the ContactList elements from the ContactLists element, and issue the PUT method on the contact resource:{username}/contacts/{contact-id}

Removing a contact does not mean that the contact has unsubscribed or opted out of receiving emails.  It means the contact simply does not belong to any particular contact list, and can be added back to a list by the account owner.  However, this API should not be used if the contact has unsubscribed from receiving all emails.  Instead, you must opt-out the contact.

Which looks straightforward. My xml POST request contains:

<entry xmlns="">
<link href="/ws/customers/*obfuscated*/contacts/*obfuscated*" rel="edit"/>
<title type="text">Contact:</title>
<name>Constant Contact</name>
<content type="application/vnd.ctct+xml">
<Contact xmlns="" id="*obfuscated*/contacts/*obfuscated*">
<Name>Freddy Blogg</Name>

<title type="text">Contacts for Customer: *obfuscated*</title>
<link href="contacts"/>
<link href="contacts" rel="self"/>

which gets the following response:

Error 400: The new contact must contain at least on valid ContactList

Something which would seem to go against the documentation. What am I missing here? Is there a way to remove the last list without opt-out?




Hello Martin,

I took a look at your XML and I was not able to recreate the error that you are having. When I take that XML and do a PUT call to my contacts ID, it updates the contact to the removed folder.

Can you verify that you are doing a PUT call and not a POST call? The error you are getting is the exact error you would get if you were trying to do a POST with that XML to the contacts URI.

If you are still having this issue and you have verified its a PUT call, can you send us the code to the Webservices Support team, so that we can take a look at what might be going on?


Benjamin Soder
NOC Analyst
Constant Contact
Regular Participant

I, too, ran into this error and couldn't figure out what the problem was. It turned out that I needed to set my OptInSource when doing the PUT to ACTION_BY_CUSTOMER when


was empty.


Hope this helps somebody!

Developer Portal

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

Visit Page