/link

GET

Canonical Mobana link endpoint. One URL for both attribution and engagement — the OS opens your app directly when installed, with a clean web fallback otherwise.

Overview#

/link is the canonical Mobana link path. Use it everywhere — ad campaigns, influencer drops, push notifications, email, share sheets, referral links. The same URL behaves differently depending on whether the app is installed:

  • App not installed — the OS opens the URL in the browser. Mobana runs the two-phase web flow: collects device signals, writes a Click row, then redirects to the App Store / Play Store. On first launch the SDK calls /find to match the install to that Click — attribution lands in getAttribution() and any deeplink payload fires through onDeepLink('deferred').
  • App installed — iOS / Android intercept the URL via Universal Links / App Links and hand it directly to your app. onDeepLink('universal_link') fires within ~50 ms of the tap, before any network round-trip.

Customers don't pick a path per link — there's only one. Your app's onDeepLink handler decides what to do with each payload (e.g. apply an unlock code when data.unlock is set, otherwise ignore the event as a vanilla campaign click).

See the Deeplinks & Universal Links guide for the full lifecycle, plus the platform setup (Team ID, SHA-256 fingerprints, intent filters).

Endpoint#

GET https://YOUR_APP_ID.mobana.ai/link

Or use your custom endpoint: https://yourdomain.com/d/link

Query Parameters#

ParameterTypeDescription
utm_sourcestringTraffic source (e.g., facebook, google, tiktok). Highly recommended.
utm_mediumstringMarketing medium (e.g., cpc, social, email). Highly recommended.
utm_campaignstringCampaign name. Highly recommended.
utm_contentstringAd content identifier (e.g. ad variant name).
utm_termstringSearch keywords.
datastringURL-encoded JSON object for structured custom payloads (unlock codes, referral IDs, in-app routing). Delivered as a typed object on event.data in onDeepLink and on attribution.data in getAttribution(). For simple flat values, skip data and pass plain query params — they come back via click_params.
urlstringOverride the store redirect destination. If omitted, the endpoint auto-detects platform and uses the App Store / Play Store URLs configured for your app.

Every other query parameter (e.g. fbclid, ttclid, gclid, partner IDs) is captured automatically and surfaced as click_params — no configuration needed.

Examples#

Vanilla campaign link

Campaign URL
https://YOUR_APP_ID.mobana.ai/link
  ?utm_source=facebook
  &utm_campaign=summer_launch
  &utm_medium=cpc

A plain UTM-tagged link. No data payload — the OS still opens your app directly when installed, onDeepLink fires with empty data and the UTM fields populated, and your handler can ignore the event entirely.

Smart link with payload

Smart link
https://YOUR_APP_ID.mobana.ai/link
  ?utm_source=tiktok
  &utm_campaign=influencer_drop
  &data={"unlock":"PROMO50","ref":"sara"}

Use data for anything you want your app to act on:

interface Unlock { unlock?: string; ref?: string }

Mobana.onDeepLink<Unlock>(({ data, source }) => {
  if (data?.unlock) applyUnlock(data.unlock);  // "PROMO50"
  if (data?.ref) trackReferrer(data.ref);
  // No data fields set? It's a vanilla campaign tap — nothing to do.
});

Universal Link / App Link setup#

For the OS to open your app directly (instead of falling through to the web flow), three pieces have to line up:

  1. App-side claim. iOS: add applinks:YOUR_APP_ID.mobana.ai to the Associated Domains entitlement. Android: add an intent-filter with android:pathPrefix="/link" and android:autoVerify="true".
  2. Server-side proof. Set your iOS Team ID and Android SHA-256 fingerprints in App Settings → Deeplinks. Mobana serves the resulting /.well-known/apple-app-site-association and /.well-known/assetlinks.json at the host root, and the OS verifies them on app install / verifier run.
  3. SDK wiring. Mobana.init() attaches the URL and AppState listeners that fire onDeepLink and notify the server about the delivered link.

Sample Android intent-filter (the iOS side is configured in Xcode):

<!-- AndroidManifest.xml -->
<intent-filter android:autoVerify="true">
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data
    android:scheme="https"
    android:host="YOUR_APP_ID.mobana.ai"
    android:pathPrefix="/link" />
</intent-filter>

Run through the Test Setup checklist to confirm AASA / assetlinks are reachable and that onDeepLink actually fires on a fresh install.

Custom endpoints#

To serve Mobana links from your own domain, your reverse proxy must forward two things:

  • /link, /link/record, /link/probe (plus the existing /find, /conversion, /flows, /ping) under your chosen path prefix.
  • /.well-known/apple-app-site-association and /.well-known/assetlinks.json at the host root, NOT under the path prefix — the OS only looks at the root.
# Using your custom endpoint
https://yourdomain.com/d/link?utm_source=email&utm_campaign=welcome

The nginx / Apache templates in App Settings → Custom Endpoint already include all of the above. See the Custom Endpoints guide for details.

AI agents: for complete Mobana SDK & API documentation, get full context here or visit llms.txt