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.

Error 400 (The requested URL returned error: 400)

Highlighted
Occasional Participant

Error 400 (The requested URL returned error: 400)

 I'm trying to add a campaign and i get error 400 message.


This is my xml:


 


<entry xmlns="http://www.w3.org/2005/Atom">


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


<id>http://api.constantcontact.com/ws/customers/vali_osf/campaigns</id>


<title type="text">127/2010-10-06</title>


<updated>2010-10-06T12:55:32+03: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/vali_osf/campaigns/2">


<Name>127/2010-10-06</Name>


<Status>Sent</Status>


<Date>2010-10-06T12:55:32 03:00</Date>


<Subject>Campanie vali</Subject>


<FromName>vali_osf@yahoo.com</FromName>


<ViewAsWebpage>NO</ViewAsWebpage>


<ViewAsWebpageLinkText></ViewAsWebpageLinkText>


<ViewAsWebpageText></ViewAsWebpageText>


<PermissionReminder>NO</PermissionReminder>


<PermissionReminderText></PermissionReminderText>


<GreetingSalutation>Dear</GreetingSalutation>


<GreetingName>FirstName</GreetingName>


<GreetingString></GreetingString>


<OrganizationName>my_organization</OrganizationName>


<OrganizationAddress1>Bucuresti</OrganizationAddress1>


<OrganizationAddress2></OrganizationAddress2>


<OrganizationAddress3></OrganizationAddress3>


<OrganizationCity>Bucuresti</OrganizationCity>


<OrganizationState></OrganizationState>


<OrganizationInternationalState></OrganizationInternationalState>


<OrganizationCountry>Romania</OrganizationCountry>


<OrganizationPostalCode>123456</OrganizationPostalCode>


<IncludeForwardEmail>YES</IncludeForwardEmail>


<ForwardEmailLinkText>Daca vreti sa trimiteti acest mesaj mai departe</ForwardEmailLinkText>


<IncludeSubscribeLink>NO</IncludeSubscribeLink>


<SubscribeLinkText></SubscribeLinkText>


<EmailContentFormat>HTML</EmailContentFormat>


<EmailContent>&lt;html>&lt;body>body&lt;/body>&lt;/html>


</EmailContent>


<EmailTextContent>&lt;Text>&lt;/Text></EmailTextContent>


<StyleSheet></StyleSheet>


<ContactLists>


<ContactList id="http://api.constantcontact.com/ws/customers/vali_osf/lists/1">


<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/vali_osf/lists/1" rel="self" />


</ContactList>


</ContactLists>


<FromEmail>


<Email id="http://api.constantcontact.com/ws/customers/vali_osf/settings/emailaddresses/1">


<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/vali_osf/settings/emailaddresses/1" rel="self" />


</Email>


<EmailAddress>vali_osf@yahoo.com</EmailAddress>


</FromEmail>


<ReplyToEmail>


<Email id="http://api.constantcontact.com/ws/customers/vali_osf/settings/emailaddresses/1">


<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/vali_osf/settings/emailaddresses/1" rel="self" />


</Email>


<EmailAddress>vali_osf@yahoo.com</EmailAddress>


</ReplyToEmail>


</Campaign>


</content>


<source>


<id>http://api.constantcontact.com/ws/customers/vali_osf/campaigns</id>


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


<link href="campaigns" />


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


<author>


<name>vali_osf</name>


</author>


<updated>2010-10-06T12:55:32+03:00</updated>


</source>


</entry> 


Can you please help me becouse i cant find wat's wrong with my xml. Thanks


 


 

4 REPLIES 4
Highlighted
Moderator

I was able to use your XML

I was able to use your XML against my account without any modifications and created the campaign.  My guess on what is wrong is that the account specific data, such as lists or emailaddresses, is incorrect or you are trying to create a campaign who's name is already used (which would return a 409 conflict error).  What is the exact error message you're receiving?

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Participant

 yes.....you were right.

 yes.....you were right. Thanks.

Highlighted
Occasional Participant

 if i send a campaign with

 if i send a campaign with "Sent" status, why it is changed to draft? i want to send it right away when i sent it to the server....

Highlighted
Moderator

All campaigns created through

All campaigns created through this API are set as Draft status.  Scheduling a Campaign to send requires special access to our Scheduling API.  To request access, please send an email to our AppConnect team for approval.

Dave Berard
Senior Product Manager, 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
Featured