I am using the following XML to attempt to create a campaign but I just can't seem to get it to work. I get a 400 error no matter what I do (I replaced personal info with info like "Company Zip" etc):
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<link href="/ws/customers/UserName/campaigns" rel="edit"/>
<id>http://api.constantcontact.com/ws/customers/UserName/campaigns</id>
<title type="text">test2</title>
<updated>2011-06-06T12:10:12+01:00</updated>
<author>
<name>Constant Contact</name>
</author>
<content type="application/vnd.ctct+xml">
<Campaign xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/UserName/campaigns/1100546096289">
<Name>test2</Name>
<Status>draft</Status>
<Date>2011-06-07T12:10:12+01:00</Date>
<Subject>Test Email</Subject>
<FromName>Company, LLC</FromName>
<ViewAsWebpage>YES</ViewAsWebpage>
<ViewAsWebpageLinkText></ViewAsWebpageLinkText>
<ViewAsWebpageText></ViewAsWebpageText>
<PermissionReminder>NO</PermissionReminder>
<PermissionReminderText></PermissionReminderText>
<GreetingSalutation>Dear</GreetingSalutation>
<GreetingName>FirstName</GreetingName>
<GreetingString>Greetings!</GreetingString>
<OrganizationName>Company Name</OrganizationName>
<OrganizationAddress1>Company Address</OrganizationAddress1>
<OrganizationAddress2></OrganizationAddress2>
<OrganizationAddress3></OrganizationAddress3>
<OrganizationCity>Company City</OrganizationCity>
<OrganizationState>Company State</OrganizationState>
<OrganizationInternationalState></OrganizationInte
rnationalState>
<OrganizationCountry>us</OrganizationCountry>
<OrganizationPostalCode>Company Zip</OrganizationPostalCode>
<IncludeForwardEmail>NO</IncludeForwardEmail>
<ForwardEmailLinkText>Forward email</ForwardEmailLinkText>
<IncludeSubscribeLink>NO</IncludeSubscribeLink>
<SubscribeLinkText>Subscribe me!</SubscribeLinkText>
<EmailContentFormat>HTML</EmailContentFormat>
<EmailContent>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:cctd="http://www.constantcontact.com/cctd">
<body>
<CopyRight>Copyright (c) 1996-2011 Constant Contact. All rights reserved. Except as permitted under a separatewritten agreement with Constant Contact, neither the Constant Contact software, nor any content that appears on any Constant Contact site,including but not limited to, web pages, newsletters, or templates may be reproduced, republished, repurposed, or distributed without theprior written permission of Constant Contact. For inquiries regarding reproduction or distribution of any Constant Contact material, pleasecontact legal@constantcontact.com.</CopyRight>
<OpenTracking/>
<!-- Do NOT delete previous line if you want to get statistics on the number of opened emails -->
<CustomBlock name="letter.intro" title="Personalization">
<Greeting/>
</CustomBlock>
Hi there!</body>
</html>
</EmailContent>
<EmailTextContent>
<Text>
<Greeting/>
Hi there!</Text>
</EmailTextContent>
<StyleSheet></StyleSheet>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/UserName/lists/59">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/UserName/lists/59" rel="self"/>
</ContactList>
</ContactLists>
<FromEmail>
<Email id="http://api.constantcontact.com/ws/customers/UserName/settings/emailaddresses/2">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/UserName/settings/emailaddresses/2" rel="self"/>
</Email>
<EmailAddress>me@me.com</EmailAddress>
</FromEmail>
<ReplyToEmail>
<Email id="http://api.constantcontact.com/ws/customers/UserName/settings/emailaddresses/2">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/UserName/settings/emailaddresses/2" rel="self"/>
</Email>
<EmailAddress>me@me.com</EmailAddress>
</ReplyToEmail>
</Campaign>
</content>
<source>
<id>http://api.constantcontact.com/ws/customers/UserName/campaigns</id>
<title type="text">Campaigns for customer: UserName</title>
<link href="campaigns"/>
<link href="campaigns" rel="self"/>
<author>
<name>UserName</name>
</author>
<updated>2011-06-06T12:10:12</updated>
</source>
</entry>
Solved! Go to Solution.
This is being addressed in thread:
http://community.constantcontact.com/t5/Authentication-and-Access-ie-401/Updating-Copying-Campaign/m...
Regards,
This is being addressed in thread:
http://community.constantcontact.com/t5/Authentication-and-Access-ie-401/Updating-Copying-Campaign/m...
Regards,