Upload a new campaign, specified by its name, subject, HTML body, text body, and format. A user can use this call to create a Journey campaign (as opposed to a "normal" campaign), OR, to create a Journey campaign AND a "Magic Journey". 


Note: if a Journey is created (by supplying a list_ID parameter value), the Journey entrant node will be when a contact is added to the list ID specified in the call. In addition, the Journey action once a contact has been added to the Journey funnel will be the sending of the newsletter created with the call.

 

Note: if a Journey is created (by supplying a list_ID parameter value), the Journey will be "active" by default. If the user wishes to activate at a later date, user should go to "Manage Journeys" and deactivate the call. 

 


JSON Request Example:             


{
  "username": "DRBrel2",
  "usertoken": "25cdc94232a34e752e150ca278e980d0416a390f",
  "requesttype": "Newsletters",
  "requestmethod": "UploadNewsletter",
  "details": {
    "name": "{*name*}", /* required */
    "subject": "{*subject*}", /* required */
    "format": "{*format*}", /* required */
    "htmlbody": "{*html_body*}", /* required if format h or b */
    "textbody": "{*text_body*}", /* required if format t or b */
    "approved": "{*approved_boolean*}",
    "active": "{*active_boolean*}",
    "archive": "{*archive_boolean*}",
    "emailtype": "{*newsletter or journey*}",
    "listid": "{*list-id (to create a magic journey)*}",
    "fromemail": "{*from_email_address*}",
    "fromname": "{*from_name*}"
  }
}


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


PLEASE NOTE: You cannot create an email campaign with a name that is already used for another campaign.  


"json_request" element


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


"details" element


Field NameDescription
name
(required)
Name of the Campaign being created
subject
(required)
Email Subject of the Campaign being created
format
(required)
specify which format(s) to send. Use h for HTML, t for text, or b for both
htmlbody
(required if format "h" or "b")
Email body in HTML format.
textbody
(required if format "t" or "b")
Email body in text format.
approved
(optional)
Enter 1, yes or true for affirmative; 0, no, or false for negative. Default is "true"
active
(optional)
Enter 1, yes or true for affirmative; 0, no, or false for negative. default is "true"
archive
(optional)
Enter 1, yes or true for affirmative; 0, no, or false for negative. Default is "false"
emailtype
(optional)
"newsletter" to create a standard newsletter
"journey" to create a journey letter
NOTE: these designations are technically for categorical purposes, however, only "journey" newsletters will have stats / metrics in the Journeys feature.  Although both standard and journey newsletters can be used to create a journey, we strongly recommend making the emailtype =  "journey" when creating journeys with this call so so as to ensure system will provide stats / metrics. 
listid
(required if "emailtype" parameter used and a magic journey is to be created)
list ID associated with creation of journey
fromemailThe send-from email address you wish to use
fromnameThem send-from text you wish to appear the recipient inbox


Successful Response:


"response"  and "response" => "data" elements


Field NameDescription
statusWill return SUCCESS if template code was successfully added
newsletteridID number of newsletter created
listid
(if optional parameter used)
list ID associated with creation of journey
campaignid
(if journey created)
Same value as newsletterid
journeyid
(if journey created)

newtrue or false



Null

Unsuccessful Response:


"response" element


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