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.

400 Error, please check my xml

Regular Participant

400 Error, please check my xml

Hey i will need you guys to look at my xml, it's not valid i guess. FYI: I am trying to create a campaign. Maybe in future instead of http errors it should return compiler-like errors to make it easier for developers.

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

<entry xmlns="http://www.w3.org/2005/Atom">
<link href="/ws/customers/stanxp4/campaigns" rel="edit" />
<title type="text">cmp_name</title>
<name>Constant Contact</name>
<content type="application/vnd.ctct+xml">
<Campaign xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/stanxp4/campaigns/1100546096289">

<Date>2010-09-28T05:22:42 01:00</Date>



<ContactList id="http://api.constantcontact.com/ws/customers/stanxp4/lists/11">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/stanxp4/lists/11" rel="self" />
<Email id="http://api.constantcontact.com/ws/customers/stanxp4/settings/emailaddresses/2">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/stanxp4/settings/emailaddresses/2" rel="self" />

<Email id="http://api.constantcontact.com/ws/customers/stanxp4/settings/emailaddresses/2">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/stanxp4/settings/emailaddresses/2" rel="self" />
<title type="text">Campaigns for customer: stanxp4</title>
<link href="campaigns" />
<link href="campaigns" rel="self" />



This is very close. I only needed to make two minor adjustments for this to create a campaign in my account.


1. Greeting Name: 'cmp_grt_name' is not a valid greeting name. You would need to modify this to a valid name, which you can see by looking at our Campaign Data XML Elements Specification. Valid options are FirstName, LastName, FirstAndLastName, None.


2. I do not see an OrganizationState, but this field is required. If you change this to use a state code such as "MA" or "TX" - this should be resolved.


Once you have made these changes this should create an email in your account. Please let me know if this does not resolves your issue with creating a campaign, and I'll be happy to take a look. Thanks.

David J

Regular Participant

Thanks David,

These two changes made it work correctly! Now i am after new thing, i want to schedule the campaign, when i set <Status>Scheduled</Status> and set <Date></Date> it doesn't schedule the email, it always make it Draft.

Best Regards,



Hello Stan,

We do allow scheduling campaigns, but it is a little different than updating the campaign to a scheduled status. Currently everyone who would like to use our scheduling API needs to get prior approval from our AppConnect team. If you email them here, they can send you over the documentation on how to schedule emails in the API.


Benjamin Soder
NOC Analyst
Constant Contact
Regular Participant


Well i will tell my client to contact your AppConnect team and ask for approval, then i will be back for a little more begging for help on the forums ;) Great support by the way!

Best Regards,



Regular Participant

Hey, me again,

My client contacted the AppConnect team and i was able to read the documentation on how to Schedule a campaign however now i am receving 403 errors when i try to send my request to https://api.constantcontact.com/ws/customers/stanxp4/campaigns/1103723472648/schedules

Since you need approval from AppConnect team i was expecting to pass me some new API key but he didn't mention of AppConnect team giving him some special api key or something like that. What might be causing this error?

Best Regards,


Regular Participant

Hello Stan,

If you did, in fact, receive permission to use the scheduler API and documentation, you should not be receiving a 403 error. To further investigate this issue and to confirm that you do indeed have access to the scheduler API, please email the webservices support team with your Username and API key.



Andrew T

Support Engineer, Constant Contact

Developer Portal

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

Visit Page