Deferred test mode: claim a test tap

Deferred test mode: claim a test tap (debug builds).

THE CALL, PART BY PART

method

POST

host

strait.link

version

/v1

resource

/test-mode/match

POST /v1/test-mode/match

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

Request

Lets a debug build prove a deferred link without reinstalling. The SDK sends its debug device id; if a workspace writer opened a 15-minute test window in the dashboard and tapped a link, the answer carries that link (matchMethod: test, test: true). Never touches production matching. Only mounted when the engine runs with TEST_MODE=on (otherwise 404). Publishable key, current key only.

Body (JSON)

publishableKey required string
deviceId required string
The SDK debug device id
platform string

Response

  • 200 Matched (longUrl, linkId, clickId) or not (matched: false with a reason)
  • 400 deviceId missing or malformed
  • 401 Missing, invalid or rotated publishable key
  • 404 Test mode is off on this engine
  • 429 Rate limited (per IP)
Request · curl
curl -X POST https://strait.link/v1/test-mode/match \
  -H "Content-Type: application/json" \
  -d '{
    "publishableKey": "st_pub_live_…",
    "deviceId": "dbg_3f9a2c7e",
    "platform": "android"
  }'

The response, printed

Response 200
{
  "matched": true,
  "longUrl": "https://shop.example.com/sale/summer",
  "linkId": "lnk_…",
  "clickId": "c_…",
  "matchMethod": "test",
  "reasons": [
    "test_mode"
  ],
  "test": true
}