Attribution API

The Attribution API is for sending attribution campaign events (identified by idfaidfv, or adid) that contain attribution information.


This API uses your API key passed as a query parameter in the URL of the request:

For more information, see Find your API Credentials


Region Endpoint
Standard server
EU residency server


  • When Amplitude can't match attribution events to an existing user, they're held for up to 72 hours for potential user matching. If an event isn't logged for a matching user within 72 hours of receiving the attribution data, then Amplitude drops the attribution data.
  • For most of Amplitude's partners, attribution is matched to Amplitude users and events via the Advertising ID (IDFA, IDFV, or ADID). Therefore, you must send the Advertising ID for attribution requests and you must set the idfa, idfv, and adid fields in Amplitude as the Advertising ID.
  • If you are using the iOS SDK or Android SDK, you can enable tracking of the Advertising ID by following the instructions here. If you are using a JavaScript SDK or React Native, these don't have the functionality to collect Advertising ID automatically due to Google's and Apple's privacy rules around advertising ID and web tracking. You have to send the Advertising ID through the HTTP API endpoint so that Amplitude can match attribution data/events. See keys in the HTTP API V2 doc.

Send an attribution event

Send a POST request to with two arguments: api_key and event.

Required arguments

Name Description Example
api_key Required. The project's API key. api_key
event Required. A request parameter representing the event, in JSON format. {"event_type":"[YOUR COMPANY] Install", "idfa": "AEBE52E7-03EE-455A-B3C4-E57283966239", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "ios"}

Event argument keys

These keys are available for the Event argument.

Description Example
event_type Required. String. The event info. Prefix with brackets [YOUR COMPANY]. [YOUR COMPANY] Install
platform Required. String. Either ios or android. ios
idfa or idfv Required for iOS. String. The Identifier for Advertiser or the Identifier for Vendor. You must include at least one for iOS devices. AEBE52E7-03EE-455A-B3C4-E57283966239
adid Required for Android. String. The Google ADID, or Amazon Advertising ID for Amazon devices. AEBE52E7-03EE-455A-B3C4-E57283966239
android_id Optional. String. (Android) The Android ID AEBE52E7-03EE-455A-B3C4-E57283966239
user_properties Optional. Dictionary. A dictionary of attribution properties prefixed with brackets [YOUR COMPANY]. {"[YOUR COMPANY] media source": "Facebook"}
time Optional. Long. Timestamp of the event in milliseconds since epoch. 1396381378123. It's set to the upload time by default

Example request

The following code illustrates attribution for iOS.

1curl --location --request POST '' \
2--data-urlencode 'api_key=123456789' \
3--data-urlencode 'event={"event_type":"[YOUR COMPANY] Install", "idfa": "AEBE52E7-03EE-455A-B3C4-E57283966239", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "ios"}'

1POST /attribution HTTP/1.1
3Content-Length: 365

The following example illustrates attribution on Android.

1curl --location -g --request POST '{"event_type":"[YOUR COMPANY] Install","adid": "AEBE52E7-03EE-455A-B3C4-E57283966239", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "android"}'

1POST /attribution?api_key=api_key&event="{event_type":"[YOUR COMPANY] Install","adid": "AEBE52E7-03EE-455A-B3C4-E57283966239", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "android"} HTTP/1.1


Code Message
200 Success
400 The expected JSON is formatted incorrectly.
Was this page helpful?

Thanks for your feedback!

May 21st, 2024

Need help? Contact Support


Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.