Email API Examples

Note

In this documentation page we will use MY_ADVERTISABLE_EID as an example of an Advertisable EID. To try the calls, use an Advertisable from your organization as ownership privileges are enforced.

Examples on this page

Unsubscriber Management

Get all unsubscribed email addresses for an advertisable

curl -H 'Authorization: Token YOUR_TOKEN' \
https://services.adroll.com/sendroll/api/v1/advertisables/MY_ADVERTISABLE_EID/unsubscribers?apikey=MYAPIKEY
{"unsubscribers": [
    {"date": "2016-08-19 02:20:15",
     "email_address": "foo@email.com"},
    {"date": "2017-01-02 23:28:44",
     "email_address": "bar@email.com"},
]}

Add unsubscribed email addresses to an advertisable

curl -H 'Authorization: Token YOUR_TOKEN' \
https://services.adroll.com/sendroll/api/v1/advertisables/MY_ADVERTISABLE_EID/unsubscribers?apikey=MYAPIKEY \
-H "Content-Type: application/json"
-X POST -d '{"unsubscribers": ["foo@bar.com", "not-an-email"]}'
{"ignored": ["not-an-email"]}