POST requests to https://api.linkrunner.io with a JSON body and Content-Type: application/json.
Authentication
Send your project token in the body of every request astoken. That is the only credential these endpoints need.
Common fields
These fields appear on most requests. Send them on every call once your install is registered.Rules
- Rate limit: 25 requests per second per token. Over the limit returns
429. - Response envelope: most endpoints return
{ "msg": string, "status": number, "data": object }.initis the exception (see below). - Call from the device so Linkrunner sees the device IP.
This reference uses Android examples. On iOS, send
"platform": "IOS" and a different device_data shape (IDFA, IDFV, and adservices_attribution_token instead of GAID and the install referrer). The init, trigger, capture-event, and capture-payment responses may also include SKAdNetwork values (fine_conversion_value, coarse_conversion_value, lock_postback). See iOS device data.init
Returns
202. Attribution runs in the background, so the response only acknowledges receipt.
To read the attribution result, poll
attribution-data with the same install_instance_id.attribution-data
campaign_data is null and attribution_source is "ORGANIC".
gaid and idfa are the advertising IDs the install was recorded with. If none was stored, they come from the device_data in the request. Each one is null when it is not available, for example on the other platform, when the user has not allowed tracking, or when the IDFA is all zeros.
trigger (signup)
user_data fields (only id is needed):
set-user-data
init call, before the user logs in: user_data.id is optional here. Not a replacement for signup, which still requires id.
When
user_data carries a tool’s ID (mixpanel_distinct_id, amplitude_device_id, posthog_distinct_id, moengage_user_id, braze_device_id, ga_app_instance_id with ga_session_id, or netcore_device_guid) and that integration is configured in Linkrunner, Linkrunner sends this install’s attribution to that tool for this user, the same attribution it sends after signup. This applies to installs attributed to a campaign. If the install is not attributed yet, Linkrunner sends it once attribution completes.
capture-event
user_id or install_instance_id.
capture-payment
signup.
type values: FIRST_PAYMENT, SECOND_PAYMENT, ONE_TIME, RECURRING, WALLET_TOPUP, FUNDS_WITHDRAWAL, SUBSCRIPTION_CREATED, SUBSCRIPTION_RENEWED, SUBSCRIPTION_CANCELLED, SUBSCRIPTION_REFUNDED, SUBSCRIPTION_BILLING_ISSUE, DEFAULT.
status values: PAYMENT_INITIATED, PAYMENT_COMPLETED, PAYMENT_FAILED, PAYMENT_CANCELLED.
remove-captured-payment
payment_id or user_id.
update-push-token
integrations
handle-deeplink
Errors
Need help? Contact support@linkrunner.io