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.

Something wrong with this XML, I'm not seeing it

Occasional Participant

Something wrong with this XML, I'm not seeing it

I'm getting a code 400 when I try to POST this XML: can anyone see what's wrong with it?



<?xml version="1.0" encoding="UTF-8"?>

<entry xmlns="">

<link href="/ws/customers/egulletpr/campaigns" rel="edit" />


<title type="text">Bob</title>


<author><name>Constant Contact</name></author>

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

<Campaign xmlns="" id="">





<FromName>the eGullet Society Team</FromName>


<ViewAsWebpageLinkText>Click here</ViewAsWebpageLinkText>

<ViewAsWebpageText>Having trouble viewing this email</ViewAsWebpageText>






<OrganizationName>eGullet Society for Culinary Arts and Letters</OrganizationName>

<OrganizationAddress1>20 East 93rd Street</OrganizationAddress1>



<OrganizationCity>New York</OrganizationCity>






<ForwardEmailLinkText>Forward email</ForwardEmailLinkText>


<SubscribeLinkText>Subscribe to eGullet Hot Topics announcements</SubscribeLinkText>


<EmailContent>html text</EmailContent>




<ContactList id=""><link xmlns="" href="/ws/customers/egulletpr/lists/18" rel="self" /></ContactList>



<Email id="">

<link xmlns="" href="/ws/customers/egulletpr/settings/emailaddresses/1" rel="self" />





<Email id="">

<link xmlns="" href="/ws/customers/egulletpr/settings/emailaddresses/1" rel="self" />








<title type="text">Campaigns for customer: egulletpr</title>

<link href="campaigns" />

<link href="campaigns" rel="self" />








campaign creation


I have looked over your XML and it appears that there are two issues that once I corrected, it posted fine. The first is the content node has to be valid HTML when being posted, with the minimum of opening and closing html and body tags.

The second issue is that in the EmailTextContent node you have text tags surrounding the text. This would need to be HTML encoded, using &lt; and &gt; tags. Also note that when creating correct HTML in the content node, this HTML also has to be HTML encoded.

If you have any questions regarding this please let me know.


Benjamin Soder
NOC Analyst
Constant Contact
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