Error 400 Bad request while updating a contact


Error 400 Bad request while updating a contact


We have an old development based on the .NET wrapper library of Constant Contact's V1 API that has been succesfully working for several months. But, since the last week, we are getting an error when attempting to update a contact.

The code we're using with your wrapper is as follows:

Contact xContactTemp = Utility.GetContactDetailsById(AuthenticationData, xContactList[0].Id);

if (xContactTemp.ContactLists.Count > 0 )
    xContactTemp.Status = ContactStatus.Removed;
    Utility.UpdateContactFullForm(AuthenticationData, xContactTemp);


The UpdateContactFullForm function throws an exception error 400 Bad request. The XML that is generated from the UpdateContactFullForm function is as follows:

<entry xmlns="">
    <title type="text"></title>
    <author><name>Constant Contact</name></author>
    <summary type="text">Contact</summary>
    <content type="application/vnd.ctct+xml">
        <Contact xmlns="" id="*username*/contacts/*idcontact*">
            <CustomField2>Selected option</CustomField2>


 I've validated the XML structure and seems to be correct but I'm still getting the 400 Bad request response.
 Has anything changed recently?  Any idea about it?
 Any assistance would be greatly appreciated.
 Thanks in advance.


Looking at your XML, there are no errors (which you assumed as well since this previously worked).  A fix we recently did due to Contacts being incorrectly added to the Do-Not-Mail list (Unsubscribed) inadvertantly caused this code to break.  We're looking at this now and will update soon.


As a side note, if you change the OptInSource to ACTION_BY_CUSTOMER instead of ACTION_BY_CONTACT, your code will go back to working.  This will then correctly move the Contact to a Removed state.

Dave Berard
Senior Product Manager, Constant Contact

Has this been fixed yet? I'm trying to use classic ASP (VB) code to automatically add new contact info into a list, and I'm getting:


0 :Bad Request. Check Submitted Data


(Maybe my problem is unrelated.)





I think you should modify your XML to either add lists to the ContactLists node, as pictured below, or change the OptInSource node to be "ACTION_BY_CUSTOMER" instead of action by contact as it currently is.  Your XML would indicate that the contact themself is adding them to 0 lists, therefore unsubscribing themself.  If that is the case, you don't need this XML at all--you should issue a DELETE request to the contact's URI to unsubscribe them.


        <ContactList id="" />



Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page