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

Frequent Participant

The requested URL returned error: 400

Now, When I am trying to create an account by using the partner's name, then the requested API URL shows the error as The requested URL returned error: 400


Please suggest me, what to do? How can I resolve this issue?




A 400 error usually means that the XML you are sending in your post is malformed.  Could you post the XML here on the forum that you are trying to send to the API server?  I can definitely take a look and see if I see a problem!



Benjamin Soder
NOC Analyst
Constant Contact
Occasional Participant



I'm experiencing the same error.


Here's my XML:


<entry xmlns="http://www.w3.org/2005/Atom">
 <author><name>ItalyTile Website</name></author>
 <summary type="text">Contact</summary>
 <content type="application/vnd.ctct+xml">
  <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
    <ContactList id="http://api.constantcontact.com/ws/customers/ITALTRADE/lists/1"/>


Let me know what you think.




/////////////////// UPDATE ///////////////////////


The 400 errors occurs upon calling the addSubscriber method of ConstantContact class. Hope that's helpful.

Please respond promptly!



I believe the reason you are getting a 400 error is due to the Country Code.  The country code must be US for the United States. Here is a valid list of country codes that can be used.


If you have any questions please let me know.



Benjamin Soder
NOC Analyst
Constant Contact
Occasional Participant

Yes, that seem to have fixed it!



Occasional Participant

I'm sorry to bother you with the same issue but  I cant find a solution. I keep getting "The requested URL returned error: 400".


Heres the xml data:


<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text"></title><updated>2011-12-01 01:28:03</updated>
<author><name>Amanady Products</name></author><id>urn:uuid:565e2c979b514e38924f2127b81fc0db</id>
<summary type="text">Contact</summary>
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
<Addr1>2147 Street</Addr1>
<ContactList id="http://api.constantcontact.com/ws/customers/USERNAME/lists/1"></ContactList></ContactLists>

XML is correct, what URI are you making the request to and what type of request are you making (PUT, POST, DELETE)?

Dave Berard
Senior Product Manager, Constant Contact

Also, edited your post to hide customer information.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

the uri is https://api.constantcontact.com/ws/customers/USERNAME  and using POST. Not sure if  the username: Amanady is authorized, connected or has issues.

So you would correctly be recieving an error making a POST request to that URI.  The URI for creating a new contact is the following format:




Documentation on this is found here: http://community.constantcontact.com/t5/Documentation/Creating-a-Contact/ba-p/25059

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

Sorry Dave,


I did use the correct URI: https://api.constantcontact.com/ws/customers/{username}/contacts


I tried adding a new email address and got this response:


curl response:


?xml version="1.0" encoding="UTF-8"?
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Contacts for Customer: Amanady</title>
  <link href="contacts"></link>
  <link href="contacts" rel="self"></link>
  <link href="/ws/customers/USERNAME/contacts" rel="first"></link>


But does not appear on the Active list at constant contact.


and the error response:


The requested URL returned error: 400


[*Note from a CTCT Community Admin: I removed the beginning and ending brackets from the "?xml version="1.0" encoding="UTF-8"?" line in your post above because that line breaks the "Developer Support" tab in our CTCT "Labs JMML Q&A" Facebook app (apparently, the app is trying to render that line as is, which wouldn't be acceptable in the middle of a page).]

Can you post or send us your code that you used for the curl request?  You should not receive an empty Contacts Collection feed when receiving a 400 error, it should be an error message indicating what was wrong with the request.  Since your XML was correct and worked in my account (using a different email address), the only explanation remaining is it's a code/configuration error.  If you post your code here, please obvuscate any personal information such as username/password or email the cdoe to us at webservices@constantcontact.com.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page