The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Contact API - PUT method returns "Error 400" Help!


Contact API - PUT method returns "Error 400" Help!

I first do a GET method and then do a PUT method with the same XML results and I receive the "Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>"


When calling the URL:{username}/contacts/13


<entry xmlns="">
<link href="/ws/customers/{username}/13" rel="edit"/>
<title type="text">Contact: {emailaddress}</title>
<name>Constant Contact</name>
<content type="application/vnd.ctct+xml">
<Contact xmlns="" id="{username}/contacts/13">
<Name>Mindy Meek</Name>
<ContactList id="{emailaddress}/lists/26">
<link xmlns="" href="/ws/customers/{emailaddress}/lists/26" rel="self"/>
<ContactList id="{emailaddress}/lists/10">
<link xmlns="" href="/ws/customers/{emailaddress}/lists/10" rel="self"/>
<ContactList id="{emailaddress}/lists/31">
<link xmlns="" href="/ws/customers/{emailaddress}/lists/31" rel="self"/>
<title type="text">Contacts for Customer: {emailaddress}</title>
<link href="contacts"/>
<link href="contacts" rel="self"/>


{username} = "My User Name"

{email} = "The Contacts Email"


Anyone have any ideas I ran my XML through various online Atom Validators all came back good formatting??


Ideas please??



Re: Contact API - PUT method returns "Error 400" Help!



Do you have the email address in all of the places you've referenced in the XML you posted here?  I see it in the last id node and name node, which should both reference the username for your account, not the email address of your contact.


Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More