Server-to-server (S2S) events

Use the server-to-server (S2S) events API to send event data to Adjust using HTTP requests. Use the Adjust SDK to record your installs, sessions, and reattributions, and only send custom events using the S2S API.

If you’re setting up S2S events for iOS 14+ apps, Adjust sends the conversion value to your server as an S2S response. Your server must then update the conversion values in-app. For more information on how this works, see Support for S2S events for iOS 14+.

In this article, you’ll learn how to set up and troubleshoot S2S event recording.


Send S2S events

The /event endpoint accepts the following requests for S2S events:

  • GET with URL parameters.
  • POST with URL parameters.
  • POST with body parameters. The Content-Type must be set to application/x-www-form-urlencoded.

Set up S2S Security

Set up S2S Security to guarantee the security of your S2S events and protect against spoofed requests. This requires each incoming request to carry a token generated in your Adjust dashboard. Requests that don’t carry the token or that carry an incorrect token are rejected by Adjust’s servers.

To get set up, follow the steps in the S2S Security article.

Required parameters

The /event endpoint requires the following parameters in each request:

  1. An advertising ID such as idfa for iOS or gps_adid for Android.
  2. An event token.
  3. An app token.
  4. A hardcoded s2s=1 parameter to inform the endpoint that the requests is server-to-server.

For accurate event attribution, include the following parameters with your events.

Event timestamp

The event timestamp can be specified using either the created_at_unix parameter or the created_at parameter.

  • created_at_unix: the UNIX timestamp at which the event was sent. For example: 1484085154.
  • created_at: A URL encoded timestamp in the ISO 8601 format. For example: 2023-01-02T15%3A04%3A05.000%2B0000

Make sure you check the following:

  • Events must be submitted chronologically for each device and event token according to the timestamp in the request. If Adjust receives an event with a earlier timestamp than one it previously received for the listed device and event, it rejects the event.
  • All events must be submitted within 58 days. Any events with a timestamp older than 58 days are rejected.

Share custom data

Use callback and partner parameters to send custom event data to Adjust. Callback parameters are available in your raw data exports and partner parameters are shared with your network partners.

Use the following parameters to add parameters to your requests:

  • callback_params: a URL encoded JSON object containing string key-value pairs.
  • partner_params: a URL encoded JSON object containing string key-value pairs.
Unencoded example
"f0o": "bar",
"bar": "baz"
Encoded example

To receive callback parameters in raw data exports, add data in the callback_params parameter of your S2S call.

Callback parameters
curl --location

To send event information to your network partners, add data in the partner_params parameter of your S2S call.

Partner parameters
curl --location

Record revenue events

Add the following revenue parameters to your event submissions to record S2S revenue events: