AdRoll 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 https://services.adroll.com/sendroll/api/v1/advertisables/MY_ADVERTISABLE_EID/unsubscribers?apikey=MYAPIKEY \
--user johnny_api:password
{"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 https://services.adroll.com/sendroll/api/v1/advertisables/MY_ADVERTISABLE_EID/unsubscribers?apikey=MYAPIKEY \
--user johnny_api:password \
-H "Content-Type: application/json"
-X POST -d '{"unsubscribers": ["foo@bar.com", "not-an-email"]}'
{"ignored": ["not-an-email"]}