The ever popular Error 400: The request contains...

SOLVED
Go to solution
Frequent Participant

The ever popular Error 400: The request contains...

I've stripped out everything I thought might be contributing to the problem and still can't get it to post. I am trying to create a campaign for a managed partner.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
		  <link href="https://api.constantcontact.com/ws/customers/smckeefair/campaigns" rel="edit"/>
		  <id/>
		  <title type="text"/>
		  <updated>2011-12-19T11:56:10:282Z</updated>
		  <author>
		    <name/>
		  </author>
		  <content type="application/vnd.ctct+xml">
		    <Campaign id="" xmlns="http://ws.constantcontact.com/ns/1.0/">
		      <Name>Spring Newsletter</Name>
		      <Status>Draft</Status>
		      <Date>2011-12-19T11:56:10:282Z</Date>
		      <Subject>Spring Newsletter email</Subject>
		      <FromName/>
		      <ViewAsWebpage>NO</ViewAsWebpage>
		      <ViewAsWebpageLinkText/>
		      <ViewAsWebpageText/>
		      <PermissionReminder>NO</PermissionReminder>
		      <PermissionReminderText>Permission Reminder</PermissionReminderText>
		      <GreetingSalutation>Dear</GreetingSalutation>
		      <GreetingName>FirstName</GreetingName>
		      <GreetingString/>
		      <OrganizationName/>
		      <OrganizationAddress1/>
		      <OrganizationAddress2/>
		      <OrganizationAddress3/>
		      <OrganizationCity/>
		      <OrganizationState/>
		      <OrganizationInternationalState/>
		      <OrganizationCountry/>
		      <OrganizationPostalCode/>
		      <IncludeForwardEmail>NO</IncludeForwardEmail>
		      <ForwardEmailLinkText/>
		      <IncludeSubscribeLink>NO</IncludeSubscribeLink>
		      <SubscribeLinkText/>
		      <EmailContentFormat>HTML</EmailContentFormat>
		      <EmailContent/>
		      <EmailTextContent/>
		      <StyleSheet/>
		      <ContactLists/>
		      <FromEmail>
		        <Email id="">
		        </Email>
		        <EmailAddress>private@shawnmckee.net</EmailAddress>
		      </FromEmail>
		      <ReplyToEmail>
		        <Email id="">
		        </Email>
		        <EmailAddress>private@shawnmckee.net</EmailAddress>
		      </ReplyToEmail>
		    </Campaign>
		  </content>
		  <source>
		    <id>https://api.constantcontact.com/ws/customers/smckeefair/campaigns</id>
		    <title type="text">Campaigns for customer: smckeefair</title>
		    <link href="campaigns"/>
		    <link href="campaigns" rel="self"/>
		    <author>
		      <name>smckeefair</name>
		    </author>
		    <updated>2011-12-19T11:56:10:282Z</updated>
		  </source>
		</entry>
1 ACCEPTED SOLUTION

Hey Shawn,

 

I see a few more issues with the XML you provided.  A Campaign ID and FromName were missing and the Campaign link was incorrect.  You must have content in the email and text in the EmailTextContent; both need to be encoded.  Below is the correct XML you should have:

 

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
		  <link href="/ws/customers/smckeefair/campaigns" rel="edit"/>
		  <id>http://api.constantcontact.com/ws/customers/smckeefair/campaigns</id>
		  <title type="text"/>
		  <updated>2009-10-19T18:34:53.105Z</updated>
		  <author>
		    <name>my new test for today</name>
		  </author>
		  <content type="application/vnd.ctct+xml">
		    <Campaign id="http://api.constantcontact.com/ws/customers/smckeefair/campaigns/1100546096289" xmlns="http://ws.constantcontact.com/ns/1.0/">
		      <Name>Spring Newsletter randome number</Name>
		      <Status>Draft</Status>
		      <Date>2011-12-19T11:56:10:282Z</Date>
		      <Subject>Spring Newsletter email</Subject>
		      <FromName>My New Name</FromName>
		      <ViewAsWebpage>NO</ViewAsWebpage>
		      <ViewAsWebpageLinkText/>
		      <ViewAsWebpageText/>
		      <PermissionReminder>NO</PermissionReminder>
		      <PermissionReminderText>Permission Reminder</PermissionReminderText>
		      <GreetingSalutation>Dear</GreetingSalutation>
		      <GreetingName>FirstName</GreetingName>
		      <GreetingString/>
		      <OrganizationName/>
		      <OrganizationAddress1/>
		      <OrganizationAddress2/>
		      <OrganizationAddress3/>
		      <OrganizationCity/>
		      <OrganizationState/>
		      <OrganizationInternationalState/>
		      <OrganizationCountry/>
		      <OrganizationPostalCode/>
		      <IncludeForwardEmail>NO</IncludeForwardEmail>
		      <ForwardEmailLinkText/>
		      <IncludeSubscribeLink>NO</IncludeSubscribeLink>
		      <SubscribeLinkText/>
		      <EmailContentFormat>HTML</EmailContentFormat>
		      <EmailContent>&lt;html>&lt;body>test&lt;/body>&lt;/html></EmailContent>
		      <EmailTextContent>&lt;Text>Test&lt;/Text></EmailTextContent>
		      <StyleSheet/>
		      <ContactLists/>
		      <FromEmail>
        <Email id="http://api.constantcontact.com/ws/customers/smckeefair/settings/emailaddresses/1">
       		<link href="/ws/customers/smckeefair/settings/emailaddresses/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
        </Email>
        <EmailAddress>private@shawnmckee.net</EmailAddress>
</FromEmail>
<ReplyToEmail>
        <Email id="http://api.constantcontact.com/ws/customers/smckeefair/settings/emailaddresses/1">
       		<link href="/ws/customers/smckeefair/settings/emailaddresses/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
        </Email>
        <EmailAddress>http://api.constantcontact.com/ws/customers/smckeefair/contacts/1</EmailAddress>
</ReplyToEmail>
		    </Campaign>
		  </content>
		  <source>
		    <id>https://api.constantcontact.com/ws/customers/smckeefair/campaigns</id>
		    <title type="text">Campaigns for customer: smckeefair</title>
		    <link href="campaigns"/>
		    <link href="campaigns" rel="self"/>
		    <author>
		      <name>smckeefair</name>
		    </author>
		    <updated>2011-12-19T11:56:10:282Z</updated>
		  </source>
		</entry>

 

Hope this helps, let us know.

 

Thanks,

 

 

Andrew Weber
Associate Product Manager for EventSpot

View solution in original post

11 REPLIES 11
Employee

Hi Shawn:

 

A properly formatted FromEmail and ReplyToEmail nodes include the ID and Links to those addresses.

 

<FromEmail>
        <Email id="http://api.constantcontact.com/ws/customers/joesflowers/settings/emailaddresses/1">
          <link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/joesflowers/settings/emailaddresses/1"
          rel="self" />
        </Email>
        <EmailAddress>joesflowers@example.com</EmailAddress>
      </FromEmail>

 

<FromEmail> and <ReplyToEmail> must be set with the account's confirmed email addresses and their values must be valid ID's from Account Settings and Email Address Resource.

 

Hope this helps, please let us know.

 

Thanks,

Andrew Weber
Associate Product Manager for EventSpot
Frequent Participant

I've been using the Coldfusion sample code and it didn't include the <link> elements when it built the XML. I've updated it to handle that. Still no joy. All the rest of the packet remains the same.

 

<FromEmail>
<Email id="http://api.constantcontact.com/ws/customers/smckeefair/contacts/1">
<link href="/ws/customers/smckeefair/contacts/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
</Email>
<EmailAddress>private@shawnmckee.net</EmailAddress>
</FromEmail>
<ReplyToEmail>
<Email id="private@shawnmckee.net">
<link href="/ws/customers/smckeefair/contacts/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
</Email>
<EmailAddress>http://api.constantcontact.com/ws/customers/smckeefair/contacts/1</EmailAddress>
</ReplyToEmail>

 

Hey Shawn,

 

The link href is to a verified email address on the account.  The URI you should use is: 

/ws/customers/smckeefair/settings/emailaddresses/1
Andrew Weber
Associate Product Manager for EventSpot
Frequent Participant

Well I'm feeling fairly stupid for not noticing the rather major differences in those two but still no joy.

 

<FromEmail>
        <Email id="http://api.constantcontact.com/ws/customers/smckeefair/settings/emailaddresses/1">
       		<link href="/ws/customers/smckeefair/settings/emailaddresses/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
        </Email>
        <EmailAddress>private@shawnmckee.net</EmailAddress>
</FromEmail>
<ReplyToEmail>
        <Email id="http://api.constantcontact.com/ws/customers/smckeefair/settings/emailaddresses/1">
       		<link href="/ws/customers/smckeefair/settings/emailaddresses/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
        </Email>
        <EmailAddress>http://api.constantcontact.com/ws/customers/smckeefair/contacts/1</EmailAddress>
</ReplyToEmail>

Hey Shawn,

 

I see a few more issues with the XML you provided.  A Campaign ID and FromName were missing and the Campaign link was incorrect.  You must have content in the email and text in the EmailTextContent; both need to be encoded.  Below is the correct XML you should have:

 

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
		  <link href="/ws/customers/smckeefair/campaigns" rel="edit"/>
		  <id>http://api.constantcontact.com/ws/customers/smckeefair/campaigns</id>
		  <title type="text"/>
		  <updated>2009-10-19T18:34:53.105Z</updated>
		  <author>
		    <name>my new test for today</name>
		  </author>
		  <content type="application/vnd.ctct+xml">
		    <Campaign id="http://api.constantcontact.com/ws/customers/smckeefair/campaigns/1100546096289" xmlns="http://ws.constantcontact.com/ns/1.0/">
		      <Name>Spring Newsletter randome number</Name>
		      <Status>Draft</Status>
		      <Date>2011-12-19T11:56:10:282Z</Date>
		      <Subject>Spring Newsletter email</Subject>
		      <FromName>My New Name</FromName>
		      <ViewAsWebpage>NO</ViewAsWebpage>
		      <ViewAsWebpageLinkText/>
		      <ViewAsWebpageText/>
		      <PermissionReminder>NO</PermissionReminder>
		      <PermissionReminderText>Permission Reminder</PermissionReminderText>
		      <GreetingSalutation>Dear</GreetingSalutation>
		      <GreetingName>FirstName</GreetingName>
		      <GreetingString/>
		      <OrganizationName/>
		      <OrganizationAddress1/>
		      <OrganizationAddress2/>
		      <OrganizationAddress3/>
		      <OrganizationCity/>
		      <OrganizationState/>
		      <OrganizationInternationalState/>
		      <OrganizationCountry/>
		      <OrganizationPostalCode/>
		      <IncludeForwardEmail>NO</IncludeForwardEmail>
		      <ForwardEmailLinkText/>
		      <IncludeSubscribeLink>NO</IncludeSubscribeLink>
		      <SubscribeLinkText/>
		      <EmailContentFormat>HTML</EmailContentFormat>
		      <EmailContent>&lt;html>&lt;body>test&lt;/body>&lt;/html></EmailContent>
		      <EmailTextContent>&lt;Text>Test&lt;/Text></EmailTextContent>
		      <StyleSheet/>
		      <ContactLists/>
		      <FromEmail>
        <Email id="http://api.constantcontact.com/ws/customers/smckeefair/settings/emailaddresses/1">
       		<link href="/ws/customers/smckeefair/settings/emailaddresses/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
        </Email>
        <EmailAddress>private@shawnmckee.net</EmailAddress>
</FromEmail>
<ReplyToEmail>
        <Email id="http://api.constantcontact.com/ws/customers/smckeefair/settings/emailaddresses/1">
       		<link href="/ws/customers/smckeefair/settings/emailaddresses/1" rel="self" xmlns="http://www.w3.org/2005/Atom"/>
        </Email>
        <EmailAddress>http://api.constantcontact.com/ws/customers/smckeefair/contacts/1</EmailAddress>
</ReplyToEmail>
		    </Campaign>
		  </content>
		  <source>
		    <id>https://api.constantcontact.com/ws/customers/smckeefair/campaigns</id>
		    <title type="text">Campaigns for customer: smckeefair</title>
		    <link href="campaigns"/>
		    <link href="campaigns" rel="self"/>
		    <author>
		      <name>smckeefair</name>
		    </author>
		    <updated>2011-12-19T11:56:10:282Z</updated>
		  </source>
		</entry>

 

Hope this helps, let us know.

 

Thanks,

 

 

Andrew Weber
Associate Product Manager for EventSpot

View solution in original post

Frequent Participant

Excellent, that fixed all of the vague error messages and I hit a few others that were fairly easy to figure out. I'd have to say the CF sample code is lacking.

Thank you Shawn,

 

We are sorry for the inconvenience.  Sounds like it is time to revisit the code in the CF wrapper.

 

Thank you for the feedback,

Andrew Weber
Associate Product Manager for EventSpot
Regular Participant

I am stuck when trying to create a campaign using the C# wrapper. I've attempted to compare the text outputted from the wrapper function to the sample provided in the documentation and while I see a few minor differences nothing seems to be jumping out at me as the error... Below is the data that is being submitted to the WebService. I tried to highlight the differences that I noticed including the date time field, the campaign ID and email IDs (all zeros?) and finally the lack of the closing tags for the elements that did not have data. I am sure this is something simple that I am missing but so far I've been able to do everything thing else but the campaign creation...

 

Any help you can offer would be greatly appreciated!!

 

Thanks!

 

Capture.JPG

Frequent Participant

I'm sure someone from CTCT will get to this soon but in the mean time I have one suggestion. I don't think 0 for the email address link is going to work. Needs to be number related to an actual address, probably 1 as that is the address of the CTCT account. Also don't follow it with a / just end with the number. The final email address tag also needs to be the full link not just the address.

 

As to the "missing" closing tag, the opening tag ending with a / closes it just like in XHTML.

 

Shawn

In looking at your XML, there two problems that would cause you to get an error message and one was pointed out by Shawn: FromEmail and ReplyToEmail must have a valid ID.  To get the valid IDs of verified addresses in your account you would have to use the get request for the settings email addresses, pick the one you want to use and set the ID to that email address.  If you do not set a valid email address for the FromEmail and ReplyToEmail, you will correctly receive a 400 error through the API.

 

Second problem, the content you are putting in for EmailContent and EmailTextContent must be HTML encoded before assigning it to Campaign.Content and Campaign.TextContent.  You can do that in .NET by using the WebUtility.HtmlEncode(String) method.  Not encoding the content of these nodes will cause a 400 or potentially a 500 error depending ont he content of these nodes and can be very difficult to solve by looking at the error messages. 

 

RE the "unclosed tags" you pointed out, they are actually just self closed (notice the /> at the end of each one of those tags).  In XML, just like in HTML, you can end markup nodes that have no value with a self closing /> tag.  These nodes are included still because the XML validation on our side requires them to be present in the markup even though they have no values.  As for your questions on the <Date> node, Campaign id attribute, <updated> node and the rel="edit" attribute for the <link> node, none of these nodes are write nodes.  They are read only and actually set on the server side upon Campaign creation.  They are set to dummy values in the API as the XML validation requires them to be present.

Dave Berard
Senior Product Manager, Constant Contact
Regular Participant

Thank you for all the help and recomendations. I've attempted to make all the changes recommended though unfortunately I am still getting the same error message back. I've included the text below that is the data that is sent over in the hopes that something will jump out at you all and I can get over this hump. I've also included the c# that I am using to generate the data in case that has something glaring that you can see.

 

Again, thanks for all the help and info with this!

 

 

 

<?xml version='1.0' encoding='UTF-8'?><entry xmlns="http://www.w3.org/2005/Atom"><link href="/ws/customers/pothomas@_________.com/campaigns" rel="edit" /><id>http://api.constantcontact.com/ws/customers/pothomas@_________.com/campaigns</id><title type="text">test campaign</title><updated>2012-01-17T21:59:40.6980369-05: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/pothomas@_________.com/campaigns/0000000000000" ><Name>test campaign</Name><Status>Draft</Status><Date>2012-01-17T21:58:41.6945088-05:00</Date><Subject>test subject</Subject><FromName>__________</FromName><ViewAsWebpage>NO</ViewAsWebpage><ViewAsWebpageLinkText></ViewAsWebpageLinkText><ViewAsWebpageText></ViewAsWebpageText><PermissionReminder>YES</PermissionReminder><PermissionReminderText>You're receiving this email because of your relationship with ctct. Please &lt;ConfirmOptin>&lt;a style="color:#0000ff;">confirm&lt;/a>&lt;/ConfirmOptin> your continued interest in receiving email from us.</PermissionReminderText><GreetingSalutation>Dear</GreetingSalutation><GreetingString>Greetings!</GreetingString><OrganizationName>LifeSaver</OrganizationName><OrganizationAddress1>123 Main</OrganizationAddress1><OrganizationAddress2></OrganizationAddress2><OrganizationAddress3></OrganizationAddress3><OrganizationCity>Anytown</OrganizationCity><OrganizationState>GA</OrganizationState><OrganizationInternationalState></OrganizationInternationalState><OrganizationCountry>US</OrganizationCountry><OrganizationPostalCode></OrganizationPostalCode><IncludeForwardEmail>NO</IncludeForwardEmail><ForwardEmailLinkText></ForwardEmailLinkText><IncludeSubscribeLink>NO</IncludeSubscribeLink><SubscribeLinkText></SubscribeLinkText><GreetingName>FirstName</GreetingName><EmailContentFormat>HTML</EmailContentFormat><EmailContent>&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;</EmailContent><EmailTextContent>&lt;Text&gt;This is the text version.&lt;/Text&gt;</EmailTextContent><StyleSheet></StyleSheet><ContactLists><ContactList id="http://api.constantcontact.com/ws/customers/pothomas@_________.com/lists/2"><link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/pothomas@_________.com/lists/2" rel="self" /></ContactList></ContactLists><FromEmail><Email id="http://api.constantcontact.com/ws/customers/pothomas@_________.com/settings/emailaddresses/0"><link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/pothomas@_________.com/settings/emailaddresses/0" rel="self" /></Email><EmailAddress><?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom">   <link href="/ws/customers/pothomas%40_________.com/settings/emailaddresses/1" rel="edit"></link>   <id>http://api.constantcontact.com/ws/customers/pothomas%40_________.com/settings/emailaddresses/1</id>   <title type="text">pothomas@_________.com</title>   <updated>2003-07-28T18:30:37.443Z</updated>   <author>     <name>Constant Contact</name>   </author>   <content type="application/vnd.ctct+xml">     <Email xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/pothomas%40_________.com/settings/emailaddresses/1">       <EmailAddress>pothomas@_________.com</EmailAddress>       <Status>Verified</Status>       <VerifiedTime>2003-07-28T18:30:37.443Z</VerifiedTime>     </Email>   </content>   <source>     <id>http://api.constantcontact.com/ws/customers/pothomas%40_________.com/settings/emailaddresses</id>     <title type="text"></title>     <link href="emailaddresses"></link>     <link href="emailaddresses" rel="self"></link>     <author>       <name>pothomas@_________.com</name>     </author>     <updated>2012-01-18T02:59:11.272Z</updated>   </source> </entry></EmailAddress></FromEmail><ReplyToEmail><Email id="http://api.constantcontact.com/ws/customers/pothomas@_________.com/settings/emailaddresses/0"><link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/pothomas@_________.com/settings/emailaddresses/0" rel="self" /></Email><EmailAddress><?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom">   <link href="/ws/customers/pothomas%40_________.com/settings/emailaddresses/1" rel="edit"></link>   <id>http://api.constantcontact.com/ws/customers/pothomas%40_________.com/settings/emailaddresses/1</id>   <title type="text">pothomas@_________.com</title>   <updated>2003-07-28T18:30:37.443Z</updated>   <author>     <name>Constant Contact</name>   </author>   <content type="application/vnd.ctct+xml">     <Email xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/pothomas%40_________.com/settings/emailaddresses/1">       <EmailAddress>pothomas@_________.com</EmailAddress>       <Status>Verified</Status>       <VerifiedTime>2003-07-28T18:30:37.443Z</VerifiedTime>     </Email>   </content>   <source>     <id>http://api.constantcontact.com/ws/customers/pothomas%40_________.com/settings/emailaddresses</id>     <title type="text"></title>     <link href="emailaddresses"></link>     <link href="emailaddresses" rel="self"></link>     <author>       <name>pothomas@_________.com</name>     </author>     <updated>2012-01-18T02:59:11.994Z</updated>   </source> </entry></EmailAddress></ReplyToEmail></Campaign></content><source><id>http://api.constantcontact.com/ws/customers/pothomas@_________.com/campaigns</id><title type="text">Campaigns for customer: pothomas@_________.com</title><link href="campaigns" /><link href="campaigns" rel="self" /><author><name>pothomas@_________.com</name></author><updated>2012-01-17T21:59:40.7292370-05:00</updated></source></entry>

 

 

 

     ConstantContactBO.Entities.EmailCampaign campaign = new ConstantContactBO.Entities.EmailCampaign();             campaign.Name = "test campaign";            

campaign.State = CampaignState.Draft;           

  campaign.Date = System.DateTime.Now;           

  campaign.Subject = "test subject";            

 campaign.FromName = "_________";            

campaign.ViewAsWebpage = false;            

 campaign.ViewAsWebpageLinkText = "";            

 campaign.ViewAsWebpageText = "";            

 campaign.PermissionReminder = true;           

  campaign.PermissionReminderText = "You're receiving this email because of your relationship with ctct. Please &lt;ConfirmOptin>&lt;a style=\"color:#0000ff;\">confirm&lt;/a>&lt;/ConfirmOptin> your continued interest in receiving email from us.";           
  campaign.GreetingSalutation = "Dear";            

campaign.GreetingName = "FirstName";           

  campaign.GreetingString = "Greetings!";         

    campaign.OrganizationName = "_________";            

 campaign.OrganizationAddress1 = "123 Main";            

campaign.OrganizationAddress2 = "";       

      campaign.OrganizationAddress3 = "";     

        campaign.OrganizationCity = "Anytown";
            campaign.OrganizationState = "GA";   

          campaign.OrganizationInternationalState = "";         

    campaign.OrganizationCountry = "US";           

  campaign.IncludeForwardEmail = false;            

 campaign.ForwardEmailLinkText = "";            

 campaign.IncludeSubscribeLink = false;            

 campaign.SubscribeLinkText = "";

            campaign.EmailContentFormat = "HTML";            

 campaign.Content = System.Net.WebUtility.HtmlEncode("<html><body>test</body></html>");             campaign.TextContent = System.Net.WebUtility.HtmlEncode("<Text>This is the text version.</Text>");             campaign.StyleSheet = "";

            string t = "";            

 ContactList cList = Utility.GetContactListCollection(authdata, out t)[0];           

  campaign.ContactLists = new List<ContactList>(1);           

  campaign.ContactLists.Add(cList);           

  campaign.FromEmail = Utility.httpGet(authdata, "https://api.constantcontact.com/ws/customers/" + authdata.Username + "/settings/emailaddresses/1");            

 campaign.ReplyToEmail = Utility.httpGet(authdata, "https://api.constantcontact.com/ws/customers/" + authdata.Username + "/settings/emailaddresses/1");      

       campaign.CampaignType = CampaignType.CUSTOM;     
        Utility.CreateNewEmailCampaign(authdata, campaign);

 

Developer Portal

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

Visit Page