Upload a new campaign, specified by its name, subject, HTML body, text body, and format.


XML Request Example:             

<?xml version="1.0" encoding="UTF-8"?>
<xmlrequest>
   <username>admin</username>
   <usertoken>abc123abc123abc123abc123abc123abc123abc123abc123</usertoken>
   <requesttype>newsletters</requesttype>
   <requestmethod>UploadCampaign</requestmethod>
   <details>
      <name>My New Email Campaign</name>
      <subject>10 Reasons to Read This Email</subject>
      <htmlbody><body>HTML Content</body></htmlbody>*
      <textbody>Hello</textbody>*
      <format>b</format>
      <active>1</active>
      <archive>0</archive>
      <approved>1</approved>
   </details>
</xmlrequest>

 <xmlrequest> element


Field NameDescription
usernameUsername used to login to Pinpointe
usertokenUnique token assigned to Pinpointe account
requesttypeName of API set to be used
requestmethodFunction being called


<details> element


Field NameDescription
nameName of the Campaign being created
subjectEmail Subject of the Campaign being created
htmlbodyEmail body in HTML format. Ensure data is HTML-encoded so XML request will parse correctly*
textbodyEmail body in text format. Ensure data is HTML-encoded  so XML request will parse correctly*
formatSpecify which format(s) to send. Use h for HTML, t for text, or b for both
activeUse 1 to mark the campaign active and 0 for inactive
archiveUse 1 to archive the campaign and 0 to not
approvedUse 1 to mark the campaign approved and 0 for Unapproved


Successful Response:


<response> element


Field NameDescription
statusWill return SUCCESS if user was successfully added
dataID number of new campaign
versionVersion number of API used


Successful Response Example:

 

<response>
   <status>SUCCESS</status>
   <data>18493</data>
   <version>3.0</version>
</response>

 

Unsuccessful Response:


<response> element


Field NameDescription
statusWill return ERROR if unsuccessful
errormessageText explaining why request failed


*Put the HTML Content (and Text Content, if any)  in a CDATA section.  This is an escape mechanism that tells the XML parser to just grab whatever characters it finds, without trying to interpret them as XML, until it sees the end CDATA marker.


This would look like:


   <details>

          <name>My New Email Campaign</name>

          <subject>10 Reasons to Read This Email</subject>

          <htmlbody><![CDATA[ HTML Content ]]></htmlbody>

          <textbody><![CDATA[ Hello ]]></textbody>

          <format>b</format>

          <active>1</active>

          <archive>0</archive>

          <approved>1</approved>

   </details>