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


JSON Request Example:             

{
  "username": "DRB-Test",
  "usertoken": "a1de7f1e68e24201ad22a0cb166eee90c969237e",
  "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
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* The code will go between the [CDATA[  and  ]] characters.
textbodyEmail body in text format. Ensure data is HTML-encoded  so XML request will parse correctly* The code will go between the [CDATA[ and ]] characters.
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