Skip to main content
Use this endpoint when your app is opened after install (or on first launch) to record the install and get attribution. The backend can attribute the install to a DeepLink click (e.g. by Android install referrer or by matching a recent iOS click by IP/time). No authentication is required for this public tracking endpoint.

Endpoint

POST /api/v1/track/install
Replace the base URL with your API host (e.g. https://api.deeplink.invyto.in or your self-hosted URL).

Request

Send a JSON body with the following optional fields. The server will use request IP and User-Agent when values are omitted.
FieldTypeRequiredDescription
platformstringNo"android", "ios", or "web". Inferred from User-Agent if not set.
referrerstringNoAndroid: install referrer string (e.g. from Install Referrer API). Used to attribute the install to a link.
linkIdstringNoDeepLink link ID if you already know which link to attribute (e.g. from deferred deep link flow).
modelstringNoDevice model.
packageNamestringNoAndroid: app package name.
browserstringNoBrowser name. Defaults to parsed User-Agent.
userAgentstringNoFull User-Agent. Defaults to request header.
OSVersionstringNoOS version. Defaults to parsed User-Agent.
ipAddressstringNoClient IP. Defaults to request IP.
countrystringNoCountry.
statestringNoState/region.
citystringNoCity.
deviceIdstringNoOptional device identifier. Defaults to model, referrer, or a fallback.

Example request

curl -X POST 'https://api.deeplink.invyto.in/api/v1/track/install' \
  -H 'Content-Type: application/json' \
  -d '{
    "platform": "android",
    "referrer": "utm_source=campaign&utm_campaign=summer",
    "packageName": "com.yourapp.client",
    "OSVersion": "14"
  }'
{
  "platform": "android",
  "referrer": "utm_source=campaign&utm_campaign=summer",
  "packageName": "com.yourapp.client",
  "OSVersion": "14"
}

Response

  • 200 — Install recorded. Body format depends on attribution:
    • Organic (no link attributed):
      { "status": "organic" }
      
    • Android with referrer (referrer string returned for your use):
      { "method": "referrer", "data": "utm_source=..." }
      
    • iOS (or when linkId is used) — UTM from the matched click:
      {
        "utm_source": "email",
        "utm_medium": "newsletter",
        "utm_campaign": "summer"
      }
      
    • If you sent linkId, the backend associates the install with that link; the response may still include UTM or a simple success payload depending on implementation.
  • 500 — Server error. Response body: { "error": "Internal Server Error" }.

Attribution behavior

  • Android — If you send referrer, the backend can associate the install with a link that generated that referrer. The response may echo the referrer or return UTM derived from it.
  • iOS — There is no install referrer. The backend typically matches the install to a recent click (e.g. same IP within a time window) and returns that click’s UTM in the response.
  • linkId — If your app already knows the link (e.g. from deferred deep link data), sending linkId ensures the install is attributed to that link.

Example: Flutter/Dart

final response = await http.post(
  Uri.parse('https://api.deeplink.invyto.in/api/v1/track/install'),
  headers: {'Content-Type': 'application/json'},
  body: jsonEncode({
    'platform': 'android', // or 'ios'
    'referrer': referrer,   // from Install Referrer on Android; omit on iOS
    'packageName': 'com.yourapp.client',
    'OSVersion': await getOsVersion(),
  }),
);
final attribution = jsonDecode(response.body);
// Use attribution.utm_source, attribution.utm_campaign, etc. for routing or analytics.

See also