Error 400: Errors in the common Atom sections


Error 400: Errors in the common Atom sections

A monthly campaign set of mine is not working, calls to update a campaign via, for example:


Return a 400-code error:

Constant Contact HTTP Request Exception: Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>.


I've tried to identify any kind of error in the XML but it appears valid, and if there is an problem with the content I cannot find it. The XML sent is as follows:


<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="">
  <link href="/ws/customers/customer/campaigns" rel="edit"/>
  <title type="text">2013 Monthly Emails - 06/13</title>
    <name>Constant Contact</name>
  <content type="application/vnd.ctct+xml">
    <Campaign xmlns="" id="">
      <Name>2013 Monthly Emails - 06/13</Name>
      <Subject>How to Remove Ketchup From Your Carpet</Subject>
      <FromName>Oxi Fresh</FromName>
      <OrganizationAddress1>143 Union Blvd</OrganizationAddress1>
      <OrganizationCity>Colorado Springs</OrganizationCity>
      <ForwardEmailLinkText>Forward this email</ForwardEmailLinkText>
      <SubscribeLinkText>Subscribe Me!</SubscribeLinkText>
      <EmailTextContent>This email requires you use the HTML version to view its content.</EmailTextContent>
        <ContactList id="">
          <link xmlns="" href="/ws/customers/redacted/lists/2" rel="self"/>
        <Email id="">
          <link xmlns="" href="/ws/customers/redacted/settings/emailaddresses/1" rel="self"/>
        <Email id="">
          <link xmlns="" href="/ws/customers/redacted/settings/emailaddresses/1" rel="self"/>
    <title type="text">Campaigns for customer</title>
    <link href="campaigns"/>
    <link href="campaigns" rel="self"/>


Any help tracking this down would be appreciated. 




Recently, an update we made on our end caused this error to start happening when it wasn't previously.  I'm very sorry for the inconvenience.  This issue only appears to affect updating email campaigns that utilize Constant Contact templates (STOCK campaigns created while logged into the account).


Our engineers are working on fixing this issue, hopefully in the next few weeks.  Our V2 API doesn't have this issue (it uses JSON, not XML), so if you'd like to move over now, it would avoid the problem.  Here is documentation for email campaign management with the V2 API.  The process is very similar to the V1 API; you make a GET call to the campaign, modify it, and send back the modified campaign with a PUT request.


Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

I am getting  error 400:errors in the common Atom sections.My php code is 


$method = strtoupper("Post");
$params['activityType'] = 'SV_ADD';
$params['data']='"Email Address"';
$session = curl_init('');
curl_setopt($session, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($session, CURLOPT_USERPWD, "key%usernamepassword");
curl_setopt($session, CURLOPT_POST, 1);
curl_setopt($session, CURLOPT_POSTFIELDS , $params);
curl_setopt($session, CURLOPT_HTTPHEADER, Array("Content-Type:application/atom+xml"));
curl_setopt($session, CURLOPT_HEADER, false); // Do not return headers
curl_setopt($session, CURLOPT_RETURNTRANSFER, 1); // If you set this to 0, it will take you to a page with the
$response = curl_exec($session);


for try purpose i used dummy email address and username i given as Un.can anyone help me to findout what i am doing wrong??

Hello @ramesht183,


Thank you for reaching out to Constant Contact's API Support.


It looks like you are using our v1 API endpoints. That version of the API still works, but is considered deprecated. Is there any particular reason you are trying to use it and not using our current v2 API?


I would suggest moving to the v2 API and using those endpoints. Here is a link to the documentation:

Jimmy D.
Tier II API Support Engineer
Developer Portal

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

Visit Page