Strait
v0.9.3Create, search and pause deep links; QR codes; analytics, taps, events; domains; webhooks.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_link Create a link
Create one deep link (short link) in the workspace of STRAIT_SECRET_KEY. Returns the link with its shortUrl (https://<workspace>.strait.link/<slug>) to share. The link opens the app when installed (App Links / Universal Links), otherwise the store or website, and keeps the destination through an install. For more than a few links use batch_create_links.
| Parameter | Type | Description |
|---|---|---|
longUrl * | string | Where the link goes: an https URL on your app's domain. The app receives its path and query as the in-app route. |
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
androidFallbackUrl | string | Android without the app (website mode): this page instead of longUrl |
campaign | string | Campaign name for analytics; defaults to longUrl's utm_campaign |
description | string | Social preview description |
desktopUrl | string | Computers go here instead of longUrl |
expiredAction | string | Where taps go after expiry: page (expired page), store (app store), url (expiredUrl) |
expiredUrl | string | Required with expiredAction url |
expiresAt | string | number | After this the link stops opening its destination. Omit for never. |
imageUrl | string | Social preview image (https) |
iosFallbackUrl | string | iPhone without the app: this page instead of longUrl |
tags | array | |
title | string | Social preview title |
batch_create_links Create links in bulk
Create up to 500 links in one call (imports, migrations, campaigns). Each item is checked like create_link and gets its own result; a slug that already exists is a per-item 409, so re-running an import is safe. Read results[i].ok.
| Parameter | Type | Description |
|---|---|---|
links * | array |
get_link Get a link
Get one active link by slug: destination, fallbacks, tags, expiry and its shortUrl.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
list_links List links
List links, newest first, one page at a time. Pass nextCursor back as cursor until it is null. status: active (default) or paused (turned off, and can be turned back on with update_link isActive: true; links disabled for abuse are not listed).
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from the previous page |
limit | integer | Page size, default 50 |
status | string | active (default) or paused |
update_link Update a link
Change a link: its destination, title, tags or expiry, or turn it off or back on with isActive. People who tap the link afterwards get the change, so this needs confirm: true. Without it nothing changes: you get a preview of the current and proposed values to show the user first. null clears expiresAt / expiredAction / expiredUrl. isActive is sent on its own: false pauses the link (taps get the "link not found" page), true turns a paused link back on (taps follow within about 30 seconds). A link disabled for breaking the acceptable use policy cannot be turned back on, and if another active lin…
| Parameter | Type | Description |
|---|---|---|
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
confirm | boolean | true to apply the change; omit or false to preview it |
expiredAction | ||
expiredUrl | ||
expiresAt | ||
isActive | boolean | Alone: false pauses the link, true turns a paused link back on |
longUrl | string | |
tags | array | |
title | string |
get_analytics Read analytics
Taps, app opens, installs, conversions and revenue for the workspace (or one link) over a date range, optionally grouped by day, channel (whatsapp, instagram, gmail, direct…), link, platform, campaign (the link's), country (2-letter) or the tap's UTM tags (utm_source, utm_medium, utm_campaign, utm_term, utm_content). Country and UTM rows cover taps since 5 Nov 2026; older taps have key null. app_version / sdk_version split app opens and installs by the app's and the Strait SDK's version they reported (accepted since 5 Nov 2026 from SDKs that send it); taps, conversions and opens that sent no…
| Parameter | Type | Description |
|---|---|---|
from | string | Inclusive start: 2026-09-01, an ISO date-time or epoch ms |
group | string | |
link | string | Only this link (slug) |
to | string | Exclusive end, same formats; default now |
check_app_links Check App Links / Universal Links files
Check a domain's App Links (Android, /.well-known/assetlinks.json) and Universal Links (iPhone, apple-app-site-association) files: each finding has a severity (ok / warn / error) and a fix. Use it when links open the browser instead of the app. It checks the files the domain serves, not how one particular phone behaves. No key needed.
| Parameter | Type | Description |
|---|---|---|
domain * | string | A domain such as hilltop.strait.link or shop.hilltop.example (a full URL is reduced to its host) |
simulate_tap Simulate a tap
Dry-run one tap on a link from one kind of device or app and see exactly what Strait would do (redirect, in-app-browser escape page, store, preview card) and why. Nothing is recorded or billed. ua is a preset or a raw User-Agent string.
| Parameter | Type | Description |
|---|---|---|
ua * | string | A preset (android, iphone, ipad, desktop, instagram-ios, instagram-android, facebook-android, whatsapp-android, bot) or a raw User-Agent |
slug | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
url | string | The full short link instead of slug |
trace_tap Trace taps on a link
Explain where taps on a link go. With slug or url: walks the link through the common channels (Android Chrome, WhatsApp, Instagram and Facebook in-app browsers, iPhone Safari and Instagram, iPad, computer, preview bot) and returns one row per channel with the decision, where the tap is sent and the reason. A simulation: nothing is recorded. With token: reads a Live Tap Trace from the straitlink.in demo (the st value of a demo.strait.link/try link), i.e. what happened to a real tap.
| Parameter | Type | Description |
|---|---|---|
slug | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
token | string | Demo trace token (st=…) instead of a link |
url | string |
get_workspace Read the workspace and key
Read-only. Who this secret key is: the workspace name, its link domain (the host every shortUrl uses, e.g. hilltop.strait.link or a verified custom domain), custom domains, the plan, what the key may do (full, links or read) and the saved QR styles (qrStyles: their id is the preset for get_link_qr and get_campaign_qr_zip). Call it first when you need the link domain (for check_app_links) or to know whether the key can write.
get_usage Read this month's usage
Read-only. This calendar month's usage (IST, India Standard Time, UTC+05:30) against the workspace's plan: billed taps used and included, new links created and included (null = no limit), level (ok, warn from 80 % of included taps, over from 100 %) and new_links_paused. Going over never stops a redirect; new_links_paused means create_link answers 402 until an upgrade or the month ends.
get_app_setup Read the app setup
Read-only. The app setup Strait has for this workspace (GET /v1/app): Android package name, SHA-256 signing fingerprints and scheme; iPhone Team ID, bundle ID and App ID; each link domain with its assetlinks.json and apple-app-site-association URL and whether the scheduled check found it served (null = not checked yet); per platform (android, ios, web) the newest app open and the Strait SDK version it sent. Compare it with the app's own files (applicationId, signing key, bundle ID, associated domains) before editing code. App details are changed by a person in Dashboard → Apps & stores (also…
verify_app_setup Check the app setup
Read-only. Checks the whole integration now (GET /v1/app/verify) and returns each check as pass / warn / fail / unknown / skip with a plain-words fix: android_app, ios_app, app_file.<android|ios>.<host> (the files fetched live), sdk_connected (the app has reported and something arrived in the last 24 hours), sdk_current[.<platform>.<version>], link_opens and webhooks. ok is true only when nothing failed and nothing is unknown. Work through every check that is not pass and not skip: apply its fix, then call this again. Run it after any change to the app IDs, the signing key, the SDK or the app'…
get_referrals Read the referral report
Read-only. The referral report (a preview): for each referral code in a date range, the taps that carried it and the referred installs, most conversions first. Days are UTC; at most 92 days per call (default: the last 30 days). If referrals are not switched on for the workspace yet, says so instead of failing.
| Parameter | Type | Description |
|---|---|---|
from | string | Inclusive start: 2026-10-01, an ISO date-time or epoch ms |
to | string | Exclusive end, same formats; default now |
list_webhook_deliveries List webhook deliveries
Read-only. A webhook's delivery history, newest first (kept 30 days): each event sent, its status (pending = waiting for a retry, delivered, failed = gave up after 6 attempts), attempts, last HTTP status or error and the next retry time. A permanent error (e.g. unsafe_target) fails at once. Payloads are never returned. Without webhookId it lists the workspace's webhooks (id, receiver site, events, active) so you can pick one. Use it when a webhook seems to have stopped.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from the previous page |
limit | integer | Page size, default 20 |
webhookId | string | The webhook id; omit to list the webhooks first |
test_webhook Send a test webhook
Write. Sends one test event (event: ping) to a webhook right now, even if it is paused, and returns whether the receiver accepted it, its HTTP status and the time taken (never its response body). The ping is not stored or retried and changes nothing in Strait. Get the id from list_webhook_deliveries without webhookId.
| Parameter | Type | Description |
|---|---|---|
webhookId * | string | The webhook id |
redeliver_webhook_delivery Redeliver a webhook delivery
Write. Sends one past webhook delivery again, right away, to the webhook's current URL, with the same X-Strait-Delivery id (receivers that de-duplicate on it are safe); its retry schedule starts over. For failed deliveries. This re-sends a real event into the receiving system, so it needs confirm: true; without it nothing is sent. Refused (409) when already delivered or being sent right now. A paused webhook must be turned back on first (Dashboard → Settings → Webhooks), otherwise the redelivery fails at once.
| Parameter | Type | Description |
|---|---|---|
deliveryId * | string | The delivery id, from list_webhook_deliveries |
confirm | boolean | true to send it; omit or false to preview |
deactivate_link Deactivate a link
Write. Turns a link off: afterwards every tap on it gets the "link not found" page instead of the app, store or website. Its history stays in analytics, and it can be turned back on with update_link with isActive: true. This needs confirm: true; without it nothing changes and you get a preview of the link to show the user first.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
confirm | boolean | true to deactivate; omit or false to preview |
pause_link Pause a link
Write. Pauses a link: until it is resumed, every tap gets the "link not found" page instead of the app, store or website. Its history stays in analytics. Needs confirm: true; without it nothing changes and you get a preview of the link to show the user. Undo with resume_link.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
confirm | boolean | true to pause; omit or false to preview |
resume_link Resume a paused link
Write. Turns a paused link back on: taps follow it again within about 30 seconds. Needs confirm: true; without it nothing changes and you get a preview (it looks the link up among paused links). A link disabled for breaking the acceptable use policy cannot be resumed, and if another active link now uses the slug, pause or rename that one first. list_links with status: paused lists paused links.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
confirm | boolean | true to resume; omit or false to preview |
search_links Search links
Read-only. Finds links by text across slug, title, destination (longUrl), campaign and tags, or by an exact tag or campaign, including paused and inactive links (status: all). Use it for "which links point at /summer", "every link tagged diwali" or "links in the spring campaign". Reads the workspace's links export, so it needs an owner's or admin's secret key.
| Parameter | Type | Description |
|---|---|---|
campaign | string | Only links in exactly this campaign |
limit | integer | Links to return, default 20 |
query | string | Text to find (case-insensitive) in slug, title, longUrl, campaign or tags |
status | string | active (default), inactive (paused or disabled) or all |
tag | string | Only links with exactly this tag |
get_link_qr Get a QR code for a link
Read-only. A print-ready QR code for a link, in the workspace's QR style (Dashboard → Settings → QR codes); the options override it for this one code, or pass preset to use a saved style (get_workspace lists them). Returns the image (PNG, or SVG markup) and the exact URL in the code. By default scans add utm_source=qr, so they show as the qr channel in analytics. Refused (400) if the colours have under 3:1 contrast.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The link's slug: the part after the link domain, e.g. `summer` in https://hilltop.strait.link/summer |
background | string | Background colour as hex, e.g. ffffff |
color | string | Code colour as hex, e.g. 1f2937 |
format | string | png (default) or svg |
logo | boolean | Put the app icon in the middle (default: the workspace setting) |
preset | string | A saved QR style (its id from get_workspace qrStyles); color, background and logo still override it |
size | integer | Width and height in pixels, default 512 |
track | boolean | Add utm_source=qr so scans count as the qr channel (default true) |
get_campaign_qr_zip Get a campaign's QR codes as a ZIP
Read-only. Every live link of one campaign as print-ready QR codes in one ZIP (one file per link, `<slug>-qr.svg` or .png, sorted by slug), in the workspace's QR style or a saved style (preset; get_workspace lists them as qrStyles). SVG by default (vector, for print); PNG at most 1024 px and 50 links. Returns a summary and the ZIP as an embedded file. Scans add utm_source=qr by default. Limit: 3 ZIPs a minute per workspace. For very large campaigns use Dashboard -> Links -> filter by campaign -> QR ZIP.
| Parameter | Type | Description |
|---|---|---|
campaign * | string | The links' campaign name, e.g. diwali_sale (case-insensitive, as in the dashboard's links filter) |
background | string | Background colour as hex, overrides the style |
color | string | Code colour as hex, overrides the style |
format | string | svg (default) or png |
logo | boolean | Put the app icon in the middle, overrides the style |
preset | string | A saved QR style (its id from get_workspace qrStyles); color, background and logo still override it |
size | integer | Width and height in pixels (default 1024; PNG at most 1024) |
track | boolean | Add utm_source=qr so scans count as the qr channel (default true) |
compare_analytics Compare two periods
Read-only. Compares two periods: taps, app opens, installs, conversions and revenue now against before, with the change and the percent change (null when before was 0). By default "before" is the period of the same length just before. With group (channel, platform, link, campaign, country, a utm_* tag, app_version or sdk_version) it compares each row too, biggest first. Use it for "how did this week do against last week" or "why did installs drop". Days are UTC; each period at most 92 days.
| Parameter | Type | Description |
|---|---|---|
compareFrom | string | Start of the period to compare against; default: just before from |
compareTo | string | End of the period to compare against; default: from |
from | string | Inclusive start: 2026-10-01, an ISO date-time or epoch ms |
group | string | Also compare row by row |
limit | integer | Rows to compare with group, default 10 |
link | string | Only this link (slug) |
to | string | Exclusive end, same formats; default now |
get_top_links Rank the top links
Read-only. The workspace's top links over a date range, ranked by taps, app opens, installs or conversions, with each link's share of the total. Use it for "which links brought the most installs this month". Days are UTC; at most 92 days (default: the last 30).
| Parameter | Type | Description |
|---|---|---|
by | string | What to rank by, default taps |
from | string | Inclusive start: 2026-10-01, an ISO date-time or epoch ms |
limit | integer | Links to return, default 10 |
to | string | Exclusive end, same formats; default now |
list_taps List recent taps
Read-only. Recent individual taps, newest first: when, which link, platform, channel, in-app browser, where Strait sent it (sent_to), and the app open and install it led to (opened_at, open_kind, installed_at, match_method). Default: the last hour. Use it to check that a test tap was recorded and what happened to it. Reads the taps export (an owner's or admin's key).
| Parameter | Type | Description |
|---|---|---|
from | string | Inclusive start: 2026-10-01, an ISO date-time or epoch ms |
limit | integer | Taps to return, default 20 |
slug | string | Only taps on this link |
to | string | Exclusive end, same formats; default now |
list_events List recent events
Read-only. Recent conversion and revenue events (from the SDKs' track calls or record_event), newest first: name, value, currency, platform, the link and tap they are attributed to, and that tap's channel and campaign. Default: the last 7 days. Use it to check that purchases or sign-ups arrive. Reads the events export (an owner's or admin's key).
| Parameter | Type | Description |
|---|---|---|
from | string | Inclusive start: 2026-10-01, an ISO date-time or epoch ms |
limit | integer | Events to return, default 20 |
slug | string | Only events attributed to this link |
to | string | Exclusive end, same formats; default now |
record_event Record a conversion event
Write. Records one conversion or revenue event from your server side (trusted: sentWith secret_key), the same as POST /v1/event. It counts in analytics and revenue and is sent to webhooks subscribed to app.event, so it needs confirm: true; without it nothing is recorded and you get a preview. clickId ties it to the tap it came from (apps get it from the SDK). eventId (e.g. your order id) makes retries safe: the same eventId is stored once. Apps should send events with the SDKs, not this tool.
| Parameter | Type | Description |
|---|---|---|
event * | string | Event name, e.g. purchase or signup |
clickId | string | The tap this conversion came from |
confirm | boolean | true to record it; omit or false to preview |
currency | string | ISO currency, e.g. INR or USD |
data | object | Up to 20 custom key-values for the app.event webhook (not stored with the event) |
eventId | string | Idempotency id, e.g. ord_1001 |
linkId | string | The link, when there is no clickId |
platform | string | ios, android or web |
value | number | Revenue amount, e.g. 499 |
list_domains List custom domains
Read-only. The workspace's custom link domains (e.g. links.hilltop.example) with each one's status (pending_dns until the DNS records are in place, then live; verified once ownership is proven) and the exact DNS records to add. Also says whether custom domains are switched on and allowed on this plan (Scale and Enterprise) and the limit. Use it for "is my domain set up yet".
add_domain Add a custom domain
Write. Adds a custom link domain (a subdomain you own, e.g. links.hilltop.example) and returns the DNS records to add at your DNS provider: a CNAME to Strait, a TXT record proving ownership and a TXT record for the HTTPS certificate. Scale and Enterprise only, at most 5 per workspace. Needs confirm: true; without it nothing changes and you get a preview (plan, limit, domains already added).
| Parameter | Type | Description |
|---|---|---|
hostname * | string | A subdomain you own, such as links.hilltop.example |
confirm | boolean | true to add it; omit or false to preview |
remove_domain Remove a custom domain
Write. Removes a custom link domain: links stop working on it at once (they keep working on the workspace's strait.link address). Afterwards delete its CNAME and TXT records at your DNS provider. Needs confirm: true; without it nothing changes and you get a preview.
| Parameter | Type | Description |
|---|---|---|
hostname * | string | A subdomain you own, such as links.hilltop.example |
confirm | boolean | true to remove it; omit or false to preview |
list_webhooks List webhooks
Read-only. The workspace's webhooks: id, receiver site (the host only: receiver URLs often carry a secret), the events each one gets (link.clicked, app.opened, install.matched, app.event, referral.converted) and whether it is on. Never returns signing secrets. Use the id with list_webhook_deliveries or test_webhook. Webhooks are added in Dashboard → Settings → Webhooks.
check_link Check any deep link
Read-only. Checks any deep link, from any vendor (a Firebase Dynamic Link on page.link, Branch app.link, a Strait link, a plain URL): where it goes on Android, iPhone and computers, whether it still works, and what to fix. Use it before migrating links or when an old link stopped working. Only public https links. No key needed; a few checks a minute per network.
| Parameter | Type | Description |
|---|---|---|
url * | string | The full link, e.g. https://hilltop.page.link/abc |
search_docs Search the docs
Search the Strait documentation (SDK setup for React Native / Expo, Flutter, Android, iOS, Unity, web and Node; App Links and Universal Links; deferred deep linking; analytics; REST API; webhooks; migrating from Firebase Dynamic Links or Branch; troubleshooting). Returns the closest-matching sections as Markdown with their URLs. Reads the live docs on straitlink.in (refreshed hourly, so SDK versions are current); offline it uses the copy bundled with this server (docs: "bundled").
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | Sections to return, default 4 |