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.

The requested URL returned error: 400


The requested URL returned error: 400



Following is my xml being generated for create contact (ACTION_BY_CUSTOMER) API call (v1)

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title type="text">test</title>
	<summary type="text">Contact</summary>
	<content type="application/vnd.ctct+xml">
	<Contact xmlns="http://ws.constantcontact.com/ns/1.0/">	
<FirstName>Mary</FirstName> <LastName>Fuhrmann</LastName>
<ContactList id="https://api.constantcontact.com/ws/customers/xyz@checkmandesign.com/lists/28" /> </ContactLists> </Contact> </content> </entry>

 The curl is returning following error

"erorr: The requested URL returned error: 400"


I have gone through the forum, and forum and error_code documentation, and from that I undertand that this is related with xml malformed. But I can't figure out what's wrong with my xml. Could antone please help me?





After reviewing this XML, I find that it is most likely that the problem here is specifically that you are attempting to add contacts to a list that no longer exists. In this XML the contact is specifically being added to a list with the ID of 28, which is failing. In order to view the list IDs for all of the lists currently in your account, you can make a GET API request to https://api.constantcontact.com/ws/customers/USERNAME/lists


If you have any questions or any issues with updating the list ID, please let us know!


Best Regards,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page