Deferred-match lookup
Deferred-match lookup (first app open after an install).
method
POST
host
strait.
version
/v1
resource
/
POST /v1/match
Auth: publishable key as publishableKey in the JSON body. Safe in apps and websites.
Request
Called once by the SDKs on the first launch after an install, to find the tap that led to it. On iPhone it compares coarse device signals (screen, language, time zone, network) with recent taps of this workspace and answers only when exactly one tap fits; ambiguous cases are refused, never guessed. Android uses POST /v1/referrer (Play Install Referrer) instead. Rate limited per IP.
Body (JSON)
publishableKeyrequired stringplatformrequired stringscreenWidthrequired numberpixelRatiorequired numberlanguagerequired stringtimezonerequired stringappVersionstring- 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.
sdkVersionstring- The Strait SDK version, kept on the open. Same rule as appVersion.
installReferrerstring- Android: the raw Google Play install referrer string (InstallReferrerClient). Only its utm_source / utm_medium / utm_campaign / utm_term / utm_content are kept on the install (each decoded, trimmed, at most 100 characters); everything else (gclid, strait_link…) is dropped, never stored. Over 4096 characters or not a string: ignored, never an error. Listed in GET /v1/export?part=installs.
recordboolean- false = a read only (SDK checkDeferred): answer the match, record no install, open or webhook. Omit for the real first-launch check. While the workspace's test window is open (Dashboard -> Setup -> Test a link, 15 minutes), a read only gets the newest tap since the window opened, once (matchMethod test, test:true).
Response
- 200 Match result
- 400 platform and the device fields are required
- 401 Missing or invalid publishable key
- 429 Rate limited
curl -X POST https://strait.link/v1/match \
-H "Content-Type: application/json" \
-d '{
"publishableKey": "st_pub_live_…",
"platform": "ios",
"screenWidth": 393,
"pixelRatio": 3,
"language": "en-IN",
"timezone": "Asia/Kolkata"
}'const res = await fetch('https://strait.link/v1/match', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"publishableKey": "st_pub_live_…",
"platform": "ios",
"screenWidth": 393,
"pixelRatio": 3,
"language": "en-IN",
"timezone": "Asia/Kolkata"
}),
});
const data = await res.json();
console.log(res.status, data);import requests
res = requests.post(
"https://strait.link/v1/match",
json={
"publishableKey": "st_pub_live_…",
"platform": "ios",
"screenWidth": 393,
"pixelRatio": 3,
"language": "en-IN",
"timezone": "Asia/Kolkata",
},
)
print(res.status_code, res.json())<?php
// Plain PHP with ext-curl, no packages. In Laravel, Http::post($url, $body) sends the same request.
$ch = curl_init('https://strait.link/v1/match');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'publishableKey' => 'st_pub_live_…',
'platform' => 'ios',
'screenWidth' => 393,
'pixelRatio' => 3,
'language' => 'en-IN',
'timezone' => 'Asia/Kolkata',
], JSON_THROW_ON_ERROR),
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
echo $status, PHP_EOL;
print_r(json_decode($response, true));import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
// Java 17+, java.net.http only (no dependencies).
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"publishableKey": "st_pub_live_…",
"platform": "ios",
"screenWidth": 393,
"pixelRatio": 3,
"language": "en-IN",
"timezone": "Asia/Kolkata"
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://strait.link/v1/match"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> res = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());
}
}package main
import (
"fmt"
"io"
"log"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"publishableKey": "st_pub_live_…",
"platform": "ios",
"screenWidth": 393,
"pixelRatio": 3,
"language": "en-IN",
"timezone": "Asia/Kolkata"
}`)
req, err := http.NewRequest(http.MethodPost, "https://strait.link/v1/match", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
data, err := io.ReadAll(res.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(res.StatusCode, string(data))
}The response, printed
{
"matched": true,
"longUrl": "https://shop.example.com/sale/summer?utm_source=whatsapp&utm_campaign=summer-2026",
"linkId": "lnk_5f0c2a8e-3b1d-4f6a-9c7e-2d8b1a0e4f63",
"matchMethod": "exact_ext",
"confidence": null,
"clickId": "9a1c7e52-4b3d-4f8e-a6d1-0c2b5e7f9a34",
"reasons": [
"exact_ext"
],
"match": {
"method": "fingerprint",
"confidence": "probable"
}
}