Server-to-Server (S2S) API Reference¶
Note
The S2S event API is under active development. Although the API is generally stable, it may change. Event processing is not yet fully complete. Send us a message if you have questions.
API endpoint¶
To send events, make a POST
request to the https://srv.adroll.com/api
endpoint. The endpoint requires a single query parameter, advertisable
, which should be the EID of the advertisable you are sending the event to.
You can optionally specify the dry_run
parameter with a value of true
. When used, the payload is validated and logged, but doesn’t impact your audiences or attribution.
You can reduce the request size by utilizing HTTP compression (i.e., gzip).
POST https://srv.adroll.com/api?advertisable=<ADVERTISABLE_EID>
Authentication¶
You’ll need to contact your account manager to access the Server Access Tokens (SATs) required for the S2S API. We will use 1Password to share the necessary credentials with you securely. While 1Password is the tool for this secure sharing process, you won’t need to create your own 1Password account. The share link expires after seven days, and the item can only be accessed once.
The Server Access Token is sent via the Authorization
header with the Token
scheme. For example:
Authorization: Token MYTOKEN
Request Body¶
The JSON payload used to send events is structured below. A single request can send more than one event. The event format section provides details on the fields.
[{
"advertisable_eid": "<ADVERTISABLE_EID>",
"pixel_eid": "<PIXEL_EID>",
"event_name": "<EVENT_NAME>",
"event_attributes": "<EVENT_ATTRIBUTES>",
"external_data": "<EXTERNAL_DATA>",
"ip": "<IP>",
"user_agent": "<USER_AGENT>",
"conversion_value": "<CONVERSION_VALUE>",
"currency": "<CURRENCY>",
"page_location": "<PAGE_LOCATION>",
"device_os": "<DEVICE_OS>",
"device_type": "<DEVICE_TYPE>",
"package_app_name": "<PACKAGE_APP_NAME>",
"package_app_version": "<PACKAGE_APP_VERSION>",
"timestamp": "<TIMESTAMP>",
"identifiers": {
"adct": "<ADCT>",
"email": "<EMAIL_ADDRESS>",
"email_sha256": "<EMAIL_SHA256>",
"email_md5": "<EMAIL_MD5>",
"device_id": "<DEVICE_ID>",
"first_party_cookie": "<FIRST_PARTY_COOKIE>",
"user_id": "<USER_ID>"
}
}]