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)
<xmlrequest> elements
Field Name | Description |
username | Username used to login to Pinpointe |
usertoken | Unique token assigned to Pinpointe account |
requesttype | Newsletters |
requestmethod | SendCampaign |
<details> elements
Field Name | Description |
newsletter (required) | ID of campaign / newsletter to send. |
listid | ID of list (database) that will receive campaign. (note - at least one list, tag, or segment ID must be specified) |
tagid | ID of tag (list) that will receive the campaign. (note - at least one list, tag, or segment ID must be specified) |
segmentid | ID of segment that will receive the campaign. (note - at least one list, tag, or segment ID must be specified) |
sendfromname | The name to be displayed in the email "Sent From" field. (optional - will auto populate from list data) |
sendfromemail | The email address the campaign will appear to be "Sent From". (optional - will auto populate from list data) |
replytoemail | The email address the campaign will use for the "Reply To" field. (optional - will auto populate from list data) |
bounceemail | The email address the campaign will use for the bounce email address header. (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 Name | Description |
status | Will return SUCCESS if newsletter was successfully sent |
data | Will return job ID and subscriber count |
Unsuccessful Response:
<response> element
Field Name | Description |
status | Will return FAILED if unsuccessful |
errormessage | Text explaining why request failed |
XML Request Example - Sending to multiple tag (Lists) IDs using the parent database's default send-text, send-from, reply-to email addresses:
<?xml version="1.0" encoding="UTF-8"?> <xmlrequest> <username>JohnDoe</username> <usertoken>abc123abc123abc123abc123</usertoken> <requesttype>Newsletters</requesttype> <requestmethod>SendNewsletter</requestmethod> <details> <newsletter>18817</newsletter> <!-- required --> <!-- at least one list-id is required from any combination of lists, tags, segments --> <list>123456</list> <tag>129</tag> <tag>130</tag> </details> </xmlrequest>
XML Request Example - Sending to a single list (Database) IDs using the database's default send-text, send-from, reply-to email addresses: :
<?xml version="1.0" encoding="UTF-8"?> <xmlrequest> <username>JohnDoe</username> <usertoken>abc123abc123abc123abc123</usertoken> <requesttype>Newsletters</requesttype> <requestmethod>SendNewsletter</requestmethod> <details> <newsletter>18817</newsletter> <!-- required --> <!-- at least one list-id is required from any combination of lists, tags, segments --> <list>123456</list> </details> </xmlrequest>
XML Request Example - Sending to multiple Segment IDs and overriding the default sendtext, send-from and reply-to email addresses:
<?xml version="1.0" encoding="UTF-8"?> <xmlrequest> <username>JohnDoe</username> <usertoken>abc123abc123abc123abc123</usertoken> <requesttype>Newsletters</requesttype> <requestmethod>SendNewsletter</requestmethod> <details> <newsletter>{*newsletter_id*}</newsletter> <!-- required --> <!-- at least one list-id is required from any combination of lists, tags, segments --> <list>123456</list> <segment>456</segment> <segment>457</segment> <sendfromname>John Doe</sendfromname> <sendfromemail>john.doe@acme.com</sendfromemail> <replytoemail>john.doe@acme.com</replytoemail> </details> </xmlrequest>