SendRoll API Examples

The following examples use the tool cURL to submit requests to the AdRoll webservice. This method was chosen for its ubiquity, clarity, and compact syntax. Your organization’s method for calling the AdRoll webservice will vary depending on programming language and operating system. The server response shown below each webservice call excludes the HTTP headers and is formatted for readability. Actual response bodies contain less whitespace, but still conform to the JSON marshalling standard.

Note

In this documentation page we will use 0000000ADVERTISABLEEID 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://api.adroll.com/sendroll/api/v1/advertisables/0000000ADVERTISABLEEID/unsubscribers \
--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://api.adroll.com/sendroll/api/v1/advertisables/0000000ADVERTISABLEEID/unsubscribers \
--user johnny_api:password \
-H "Content-Type: application/json"
-X POST -d '{"unsubscribers": ["foo@bar.com", "not-an-email"]}'
{"ignored": ["not-an-email"]}