Dry-run a tap

Dry-run a tap (playground).

THE CALL, PART BY PART

method

GET

host

strait.link

version

/v1

resource

/simulate

GET /v1/simulate

Auth: secret key as Authorization: Bearer, or the publishable key as the publishableKey query parameter.

Request

What a tap on url with this user agent would do — the exact decision the link makes — without recording a tap, firing webhooks or counting toward your plan. Authenticate with your secret key (Bearer) or publishableKey; the link must belong to that workspace. Hand-off URLs carry a placeholder tap id (00000000-0000-4000-8000-000000000000).

Parameters

url required string query
The full short link, e.g. https://you.strait.link/summer
ua required string query
A preset (android, iphone, ipad, desktop, instagram-ios, instagram-android, facebook-android, whatsapp-android, bot) or a raw User-Agent
publishableKey string query
Instead of a secret key: the workspace publishable key
country string query
Simulate a tap from this country (ISO 3166-1 alpha-2, e.g. IN) to test the link's countryRules. Real taps use Cloudflare's country.

Response

  • 200 The decision
  • 400 Missing/invalid url or ua
  • 401 No valid key
  • 404 No such link in the key's workspace
Request · curl
curl -X GET "https://strait.link/v1/simulate?url=https%3A%2F%2Fhilltop.strait.link%2Fsummer&ua=iphone" \
  -H "Authorization: Bearer $SECRET_KEY"

The response, printed

Response 200
{
  "platform": "ios",
  "deviceClass": "phone",
  "inAppBrowser": null,
  "isBot": false,
  "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
  "slug": "summer",
  "decision": "interstitial",
  "sentTo": "app_store_page",
  "location": "https://apps.apple.com/app/id123456789?pt=lnk_123&ct=summer",
  "reason": "iPhone browser: the app did not open by itself (not installed), so it shows the \"Get the app\" page; the tap on it goes to the App Store and saves the deferred-match fingerprint",
  "passwordProtected": false,
  "abTest": false
}