Send Event

Use this API to send mobile events that occur outside the app from your servers to AppsFlyer.

⚠️

JSON payload limitation JSON payload size: up to 1KB

📘

Encode URLs - Encode (percent) code reserved characters before forming the method URL.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

JSON payload limitation JSON payload size: up to 1KB

📘

Encode URLs - Encode (percent) code reserved characters before forming the method URL.

Path Params
string
required

The app identifier used in the AppsFlyer dashboard.
Insert it excatly as it appears on the dashboard.
iOS apps: Ensure to prefix with id. Failure to do so results in a valid 200 OK return code; without recording the event.
Windows: Get the app ID from the Microsoft App Store.

Body Params
⚠️

What if I can't send a device identifier?

You may be unable to send the identifier for a reason out of your control, for example, because the user has limited ad tracking (LAT) or uses iOS 14, and did not give ATT consent.
Not sending an advertising ID/device identifier can result in:
Postback issues: The media source will receive the postback but without a device identifier; consequently the media source can't associate it with a user.
Audiences segmentation and rule failure. Audiences rulesets require identifiers. It's always best practice to send a device ID or customer user ID according to the ID type your ruleset uses, for every S2S event.

string

Where available populate with the device GAID (advertising ID)

string
string
string
string
required
\d{13}-\d{7}

A unique identifier, generated by AppsFlyer, when the app launches for the first time.

string

Customer user ID, a unique user identifier set by the app owner.

string

The user's email address, hashed using SHA-256.
Before hashing: trim leading and trailing spaces, and convert all characters to lowercase.

string

The user's phone number, hashed using SHA-256.
Before hashing: remove all symbols, letters, and leading zeros. The phone number must include the country code (for example, the US number (650)555-1212 becomes 16505551212).

string

The user's phone number in E.164 format, hashed using SHA-256.
Before hashing: normalize to E.164 format (for example, +12133734253). Include the country code prefixed with +, with no parentheses, leading zeros, spaces, letters, or symbols other than the leading +.
We recommend using libphonenumber-js for E.164 parsing.

string

The user's first name, hashed using SHA-256.
Before hashing: convert to lowercase.

string

The user's last name, hashed using SHA-256.
Before hashing: convert to lowercase.

string

The user's Facebook Login ID. Send as a numeric string.

string
length ≤ 16
^(([1-2]{0,1}[0-9]{0,1}[0-9]{1})\.([1-2]{0,1}[0-9]{0,1}[0-9]{1})\.([1-2]{0,1}[0-9]{0,1}[0-9]{1})\.([1-2]{0,1}[0-9]{0,1}[0-9]{1}))$

The mobile device's IP address during the event occurrence.
If sent, the IP address is used to populate geo fields.
If not sent, AppsFlyer populates the geo fields using the values from the install attribution event. The IP address isn't populated.

string
required

Specify the event name. Ensure that the event names are aligned with the marketer's requirements.

json
required
⚠️

If you send an event without a value then send: "eventValue":""

  • Event values must be sent without additional symbols or formatting.
  • For af_revenue a decimal point can be used. Negative values should be preceded by a -
string
string

Equivalent to AF_STORE in Android apps. The store from which the app was downloaded.

date-time

The time the event occurred using UTC timezone.

  • Default: If no eventTime is sent, the time is set to the HTTP message arrival time.
  • Format: string yyyy-mm-dd hh:mm:ss.sss the time needs to be in UTC timezone.

To learn how events are timestamped after arriving to AppsFlyer based on the eventTime value refer to this KB section.

string
enum
string

A unique app identifier. In raw-data, the parameter populates Bundle ID.
Best practice - Always populate this parameter. Many ad networks require it for campaign optimization.

sharing_filter
length ≥ 1

The sharing filter blocks the sharing of S2S events via postbacks/API with integrated partners and other third-party integrations.

Use the filter to fulfill regulatory requirements like GDPR and CCPA, to comply with user opt-out mechanisms, and for other business logic reasons.

The sharing_filter has the following options:

  • all: All partners are blocked. Don't share the event with anyone. Example: "sharing_filter": "all"
  • List of partner ids in an array.

Note:
To find out the required partner IDs:

  1. Run the Get active integrations API for a list of all active integrations
  2. Use the media_source_name values from the API response as input values to the method partners array.

Exceptions:

  • For Apple Search Ads use "Apple Search Ads" (and not "iossearchads_int").
  • For Twitter, use "twitter" (and not "twitter_int")
string

Reserved for AppsFlyer future use

string
enum

If the user event takes place in an app_clip, send the parameter. In all other cases don't send the parameter.

Allowed:
json

Send custom data to the AppsFlyer platform. Similar to sending data from the SDK using setAdditionalData
In raw data: populates custom_data field.

string

The device operating system version.

⚠️

To enable correct data processing you must send this parameter.
For backward compatibility reasons, we don't enforce this, so it isn't marked as obligatory.

📘

Note 🍏

Starting July 1, 2021, for iOS apps, if you don't send this parameter we regard the data as having come from a device running iOS 14.5.

boolean

Use this flag to indicate if the user opted out of sharing their advertiser ID.

Use this field for devices running Android (all versions), or iOS versions before 14.

📘

Note

For iOS 14.5+, use the att parameter.

Populate this field as follows:

  • true: if the user agreed to share the advertiser ID.
  • false: if the user enabled Limited Ad Tracking (LAT).
consent_data
app_set_id
object

The vendor ID shared by all apps from same vendor. For more information, see Add the app set ID SDK to your app.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json