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.

Updating email campaigns, I keep on getting 400 Bad Request Errors

Occasional Contributor

Updating email campaigns, I keep on getting 400 Bad Request Errors

Hi Everyone,


I am trying to update email campaign but i keep on getting 400 bad request errors.


any ideas?


here is my xml

<?xml version='1.0' encoding='UTF-8'?><entry xmlns="">
    <link href="/ws/customers/user1/campaigns/1105175113425" rel="edit" />
    <title type="text">Surebaby Week 4</title>
        <name>Constant Contact</name>
    <content type="application/vnd.ctct+xml">
        <Campaign xmlns="" id="" >
            <Name>Surebaby Week 4</Name>
            <Subject>Enter email subject here</Subject>
            <FromName>Clinical Study Connect</FromName>
            <ViewAsWebpageLinkText>Click here</ViewAsWebpageLinkText>
            <ViewAsWebpageText>Having trouble viewing this email?</ViewAsWebpageText>
            <OrganizationName>Tsavo Media</OrganizationName>
            <OrganizationAddress1>503 Imperial Road North</OrganizationAddress1>
            <OrganizationPostalCode>N1H 6T9</OrganizationPostalCode>
            <ForwardEmailLinkText>Forward email</ForwardEmailLinkText>
            <SubscribeLinkText>Subscribe me!</SubscribeLinkText>
                &lt;html lang=&quot;en&quot; xml:lang=&quot;en&quot; xmlns=&quot;; xmlns:cctd=&quot;;&gt;

                &lt;body&gt;&lt;CopyRight&gt;Copyright (c) 1996-2005 Roving Software Incorporated d/b/a Constant Contact. All rights reserved.  Except as permitted under a separate
                written 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 the
                prior written permission of Constant Contact.  For inquiries regarding reproduction or distribution of any Constant Contact material, please
                &lt;!--  Do NOT delete previous line if you want to get statistics on the number of opened emails --&gt;

                &lt;CustomBlock name=&quot;letter.intro&quot; title=&quot;Personalization&quot;&gt;

                <ContactList id="">
                    <link xmlns="" href="/ws/customers/user1/lists/81" rel="self" />
                <ContactList id="">
                    <link xmlns="" href="/ws/customers/user1/lists/82" rel="self" />
                <ContactList id="">
                    <link xmlns="" href="/ws/customers/user1/lists/83" rel="self" />
                <ContactList id="">
                    <link xmlns="" href="/ws/customers/user1/lists/84" rel="self" />
                <ContactList id="">
                    <link xmlns="" href="/ws/customers/user1/lists/85" rel="self" />
                <Email id="">
                    <link xmlns="" href="/ws/customers/user1/settings/emailaddresses/0" rel="self" />
                <Email id="">
                    <link xmlns="" href="/ws/customers/user1/settings/emailaddresses/0" rel="self" />
        <title type="text">Campaigns for customer: user1</title>
        <link href="campaigns" />
        <link href="campaigns" rel="self" />

Tags (1)
Occasional Contributor

Re: Updating email campaigns, I keep on getting 400 Bad Request Errors

whats am i doing wrong with my xml put ?


Re: Updating email campaigns, I keep on getting 400 Bad Request Errors

Hi Chris,


I was able to use the XML that you posted to update a campaign in my account with only a few modifications, all of which were account created rather than structural. Without having access to your account and campaign, it makes it difficult say to for sure what would be causing the issue, but I would start by looking at:


1) You are referencing verified email address id 0 as your from and reply addresses on this email. The first possible verified address in the account is id 1. You can find more information about this in Retrieving Account Email Addresses.


2) Do you have list ID's 81-85 in your account, as you are telling this campaign to include these lists? You can find out which lists you have in your account by Retrieving a Contact List Collection.


David J

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