What are Short Links?
Short Links let you replace the full Link URL with a compact 8-character code onterm.new. Instead of sharing a long URL with every parameter visible, you mint a short link and share something like https://term.new/az9qtk2d.
Short links are useful when URL length matters, like for printed mailers, SMS messages, or anywhere an end user may need to type or read the URL aloud.
Creating a short link
CallPOST /tsp/v1/link/short with the same parameters you’d otherwise put in a Link URL. However, the endpoint is server-side only, so you authenticate with your secret key.
url field is what you share with the end user.
Supported parameters
The request body accepts the same parameters available on the Link URL, includingexternalId, template, and syncMode. See the API reference for the complete list.
Using a short link
When an end user visitshttps://term.new/{code}, Terminal resolves the code server-side and runs the Link flow with the parameters you minted at creation time. Specifically, the browser redirects to https://link.withterminal.com?short_code={code}. The rest of the Link flow will always include the short_code in the url, not the full parameters, but will behave exactly like the long url.
Idempotency and expiry
Identical request bodies are de-duplicated automatically. Calling the endpoint a second time with the same parameters returns the original short link with anIdempotent-Replayed: true response header instead of minting a new code. Minting a short link with different parameters never invalidates a previously issued short link, each link lives independently until its own expiry date.
Each short link is valid for 1 year from its most recent creation or replay. The expiresAt timestamp is included in every response. Calling the create endpoint with the same body resets the expiry timestamp and returns the same code that’s associated with those parameters. After expiry, the code stops resolving and you’ll need to mint a new short link to share again.
Things to know
- Short links are intended for new connections. Reconnects continue to use the
link.withterminal.comurl with the full parameters. - Once a short link is minted, its parameters are permanent. To use different parameters, mint a new short link.
- For v1, there is no endpoint to look up the parameters bound to an existing short link or to revoke the link.
- Rotating your publishable key does not invalidate previously-created short links.
- Short links can only be minted server-side with your secret key. There is no browser-callable mint endpoint that accepts a publishable key.