Turn a short link that opened your app into its destination

THE CALL, PART BY PART

method

POST

host

strait.link

version

/v1

resource

/resolve

POST /v1/resolve

Auth: publishable key as publishableKey in the JSON body. Safe in apps and websites.

Request

Called by the SDKs when a verified short link (App Link / Universal Link) opens the app directly. With openId the lookup also records the app open and the tap (once per openId); recorded:false means retry the report via /v1/open. Old Firebase links: on a host that is not Strait's (e.g. acme.page.link), a link imported with that legacyHost + legacyCode is matched first; a long link (https://<x>.page.link/?link=…) answers reason: long_link (current SDKs read its link= on the device instead).

Body (JSON)

publishableKey required string
url required string
platform string
openId string
appState "closed" | "background" | "foreground"
firstLaunch boolean
at number
deviceClass "phone" | "tablet"
What the app runs on (iPad = tablet), stored on the tap this open records. iPadOS Safari sends a Mac user agent, so browser taps from an iPad count as desktop.
appVersion string
The app's own version (iOS CFBundleShortVersionString, Android versionName), kept on the open. 1-64 printable ASCII characters; anything else is ignored, never an error.
sdkVersion string
The Strait SDK version, kept on the open. Same rule as appVersion.

Response

  • 200 { matched, longUrl?, linkId?, slug?, clickId?, reason?, recorded? } — reason: not_found | link_unavailable (blocked for abuse or an unsafe destination) | expired | not_live (scheduled, before go-live) | password_protected | long_link (an old page.link long link: read its link= in the app). clickId (when matched) is the id of the tap this open recorded; send it with conversion events (/v1/event clickId).
  • 400 url is not a short link
  • 401 Missing or invalid key
Request · curl
curl -X POST https://strait.link/v1/resolve \
  -H "Content-Type: application/json" \
  -d '{
    "publishableKey": "st_pub_live_…",
    "url": "https://hilltop.strait.link/summer",
    "platform": "android",
    "openId": "o_lx3k2a_9f8e7d6c5b4a",
    "appState": "closed",
    "firstLaunch": false
  }'

The response, printed

Response 200
{
  "matched": true,
  "longUrl": "https://shop.example.com/sale/summer?utm_source=whatsapp&utm_campaign=summer-2026",
  "linkId": "lnk_5f0c2a8e-3b1d-4f6a-9c7e-2d8b1a0e4f63",
  "slug": "summer",
  "recorded": true,
  "clickId": "9a1c7e52-4b3d-4f8e-a6d1-0c2b5e7f9a34"
}