Send one campaign to a specified mailing list (database), tag (list) or segment. As with the web app UI, you may specify more than one list, tag, or segment. 


When specifying the recipient type ID, priority is given in reverse order. Segment IDs will be acknowledged before tag IDs, which will be acknowledged before list IDs. Essentially, the more specific recipient type ID will take precedence. If you include, for instance, a list ID, a tag ID, and a segment ID in the same JSON call, the segment ID will be used to process the campaign send, and the list ID and tag ID will be ignored.


Regarding the Send From fields of the request, if you do not explicitly set any of these fields, they will be automatically populated from list (Database) settings. If you do not specify a list ID, then the first list associated with a subscriber from any specified segment or tag IDs will be used to populate the send data. If you want to use a particular list's Send From fields, but send to a tag or a segment, you may still specify a list ID - it will be ignored in favor of any segment or tag IDs when it comes to generating the recipient list, as described in the paragraph above.

(Please see API call examples at bottom of page)

"json_request" element 


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


"details" elements


Field NameDescription
newsletter (Required)ID of campaign to send.
listID of list (database) that will receive campaign. (optional - at least one list, tag, or segment ID must be specified)
tagID of tag (list) that will receive the campaign. (optional - at least one list, tag, or segment ID must be specified)
segmentID of segment that will receive the campaign. (optional - at least one list, tag, or segment ID must be specified)
sendfromnameThe name to be displayed in the email "Sent From" field. (optional - will auto populate from list data)
sendfromemailThe email address the campaign will appear to be "Sent From". (optional - will auto populate from list data)
replytoemailThe email address the campaign will use for the "Reply To" field. (optional - will auto populate from list data)


Please note: ALL OPTIONAL elements that are not used should be deleted from submitted call. For example, if not sending to a segment, the segment section of the call should be deleted. 


Successful Response:

"response" element


Field NameDescription
statusWill return SUCCESS if newsletter was successfully sent
dataWill return job ID and subscriber count 


Unsuccessful Response:

"response" element


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



JSON Request Example - Sending to multiple tag (Lists) IDs:  


{
  "username": "JohnDoe",
  "usertoken": "abc123abc123abc123abc123",
  "requesttype": "Newsletters",
  "requestmethod": "SendNewsletter",
  "details": {
    "newsletter": "{*newsletter_id*}", /* required */
    /* at least one list-id is required from any combination of lists, tags, segments */
    "list": ["{*list_id*}", "{*list_id*}"],
    "sendfromname": "{*send_from_name*}",
    "sendfromemail": "{*send_from_email*}",
    "replytoemail": "{*reply_to_email*}"
  }
}


JSON Request Example - Sending to multiple tag (Lists) IDs:   


{
  "username": "JohnDoe",
  "usertoken": "abc123abc123abc123abc123",
  "requesttype": "Newsletters",
  "requestmethod": "SendNewsletter",
  "details": {
    "newsletter": "{*newsletter_id*}", /* required */
    /* at least one list-id is required from any combination of lists, tags, segments */
    "tag": ["{*tag_id*}", "{*tag_id*}"],
    "sendfromname": "{*send_from_name*}",
    "sendfromemail": "{*send_from_email*}",
    "replytoemail": "{*reply_to_email*}"
  }
}


JSON Request Example - Sending to multiple Segment IDs:


{
  "username": "JohnDoe",
  "usertoken": "abc123abc123abc123abc123",
  "requesttype": "Newsletters",
  "requestmethod": "SendNewsletter",
  "details": {
    "newsletter": "{*newsletter_id*}", /* required */
    /* at least one list-id is required from any combination of lists, tags, segments */
    "segment": ["{*segment_id*}", "{*segment_id*}"],
    "sendfromname": "{*send_from_name*}",
    "sendfromemail": "{*send_from_email*}",
    "replytoemail": "{*reply_to_email*}"
  }
}