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


JSON Request Example:             

{
  "username": "JohnDoe",
  "usertoken": "abc123abc123abc123abc123",
  "requesttype": "Newsletters",
  "requestmethod": "UploadNewsletter",
  "details": {
    "name": "{*name*}", /* required */
    "subject": "{*subject*}", /* required */
    "htmlbody": "<![CDATA[{*html_body*}]]>", /* required if format h or b */
    "textbody": "<![CDATA[{*text_body*}]]>", /* required if format t or b */
    "format": "{*format*}", /* required */
    "approved": "{*approved_boolean*}",
    "active": "{*active_boolean*}",
    "archive": "{*archive_boolean*}"
  }
}


PLEASE NOTE: JSON requires a stricter code format than XML. Please ensure that your template code conforms to the JSON requirements. Thank you.  


"json_request" element


Field NameDescription
usernameUsername used to login to Pinpointe
usertokenUnique token assigned to Pinpointe account
requesttypeNewsletters
requestmethodUploadNewsletter


"details" element


Field NameDescription
nameName of the Campaign being created
subjectEmail Subject of the Campaign being created
htmlbodyEmail body in HTML format.
textbodyEmail body in text format.
formatSpecify which format(s) to send. Use h for HTML, t for text, or b for both
approved
Enter 1, yes or true for affirmative; 0, no, or false for negative
activeEnter 1, yes or true for affirmative; 0, no, or false for negative
archiveEnter 1, yes or true for affirmative; 0, no, or false for negative


Successful Response:


"response" element


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


Successful Response Example:

 

{
   status: "SUCCESS",
   data: 18813,
   version: "3.0",
   elapsed: "0.21"
}


Null

Unsuccessful Response:


"response" element


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