400 Error

Regular Participant

400 Error

 I have been testing my API calls with a test account and everything seemed to be working well.

I switched over to a "live" account and I getting a 400 error when I pass:

 - <entry xmlns="http://www.w3.org/2005/Atom">

  <title type="text" />


  <author />


  <summary type="text">Contact</summary>

- <content type="application/vnd.ctct+xml">

- <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">


  <FirstName />

  <MiddleName />

  <LastName />

  <HomePhone />

  <Addr1 />

  <Addr2 />

  <Addr3 />

  <City />

  <StateCode />

  <StateName />

  <PostalCode />

  <SubPostalCode />

  <CountryCode />

  <CompanyName />

  <JobTitle />

  <WorkPhone />



  <Note />

  <CustomField1 />

  <CustomField2 />

  <CustomField3 />

  <CustomField4 />

  <CustomField5 />

  <CustomField6 />

  <CustomField7 />

  <CustomField8 />

  <CustomField9 />

  <CustomField10 />

  <CustomField11 />

  <CustomField12 />

  <CustomField13 />

  <CustomField14 />

  <CustomField15 />

- <ContactLists>

  <ContactList id="http://api.constantcontact.com/ws/customers/MDGrantsOffice/lists/26" />





Can someone tell me what is wrong with this data that is attempting to add a new contact?



I tried taking your XML and posting it to my own account, changing the list to my own list, and it successfully created the contact.

What URI are you posting this XML to? Also, are you sure you have a list 26? Please keep in mind that the list ID is not the same as the Sort order number from the User Interface when looking at a list.

If you have any questions please let me know.


Benjamin Soder
NOC Analyst
Constant Contact
Regular Participant

 Thanks for your quick response,


Yes, I do appear to have list id = 26.

Regular Participant

 Oops. I just realized what you said.  How would I know what the list id is by looking at the list?

Regular Participant

Thanks for pointing me in the right direction.  I see from the address bar that the list id is 94.   That is a bit confusing.



I apologize for the confusion, usually the best way to find the list ID would be to do an API GET call on the lists URI, and you will find your list there.


Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page