Showing results for 
Search instead for 
Did you mean: 

400 error when create a new contact

Frequent Visitor

400 error when create a new contact

I'm not able to figure out what I'm doing wrong.  I'm getting a 400 error when posting to:*****/contacts


Here is my xml:


<entry xmlns="">  <title type="text"></title>  <updated>2011-08-25T01:21:06.407Z</updated>  <author></author>  <id>data:,none</id>  <summary type="text">Contact</summary>  <content type="application/vnd.ctct+xml">    <Contact xmlns="">      <EmailAddress></EmailAddress>      <OptInSource>ACTION_BY_CUSTOMER</OptInSource>      <ContactLists>        <ContactList id="***/lists/1" />      </ContactLists>    </Contact>  </content></entry>


List 1 is a valid list.  I get a 400 error back from the server.  Is there a way to get more information on what is causing the error?



CTCT Employee

Re: 400 error when create a new contact


It looks like the problem is with how your XML is formatted.  When I changed the spacing so that each node is on a separate line, it worked for me.  I have included an example below:

<entry xmlns=""> 
<title type="text"></title>
<summary type="text">Contact</summary>
<content type="application/vnd.ctct+xml">
<Contact xmlns="">
<ContactList id="***/lists/1"/>     


I hope this helps.  Please let me know if I can be of further assistance.

Matt R.
Support Engineer, Constant Contact