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.

400 Error - Posting XML for review

Occasional Participant

400 Error - Posting XML for review

I am unsure what is causing my 400 error. Here is the XML being generated and sent via CURL.


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

<entry xmlns="">

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


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



<name>Constant Contact</name>


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

<Campaign xmlns="" id="">



<Date>2010-09-23T13:44:40 01:00</Date>




<ViewAsWebpageLinkText>Click Here</ViewAsWebpageLinkText>

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




<GreetingName>Valued Customer</GreetingName>






<OrganizationCity>West Valley City</OrganizationCity>














<ContactList id="">

<link xmlns="" href="/ws/customers/myacct/lists/13" rel="self" />




<Email id="">

<link xmlns="" href="/ws/customers/myacct/settings/emailaddresses/6" rel="self" />





<Email id="">

<link xmlns="" href="/ws/customers/myacct/settings/emailaddresses/6" rel="self" />








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

<link href="campaigns" />

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








posting a campaign


There are a few things that I noticed need to be changed in the XML, and when I did that it worked on my end. I will list them here:

  1. The GreetingName tag must be either FirstName, LastName, FirstAndLastName, or NONE. The text that you have there should be in the Greeting GreetingString section.

  2. The second thing that I saw is that you did not have any value for EmailContentFormat. It has to either be HTML or XHTML

  3. Also I noticed that your EmailContent did not contain valid HTML or XHTML. It must contain either valid HTML or XHTML when posted, depending on what you pick for EmailContentFormat.

  4. If you make these changes, it should work for you. Please let me know if you have any further questions.

Benjamin Soder
NOC Analyst
Constant Contact
Occasional Participant

 Awesome! Thanks for the

 Awesome! Thanks for the help!!!

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