URL Shortening
Overview
A short link is an alias that points at an existing dynamic link. It lives on the same project subdomain ({subdomain}.linksense.net/{slug}) and inherits the parent link's routing, social preview, deep-link config, and analytics. The only difference is the path: shorter, brandable, memorable.
acme.linksense.net/spring-promo-2026 into acme.linksense.net/promo.Short Links vs Custom Paths
Both feel similar but serve different roles:
- Custom paths are part of a dynamic link's identity. One per link.
- Short links are campaign-style aliases. A link can have many; delete and recreate to rotate.
Both share the slug namespace within a project — you cannot have a short link with the same path as a sibling custom path (or vice versa).
Creating in the Dashboard
Find the dynamic link you want to alias and open its action menu in the links list.
Pick the new Short links action to open the manager dialog.
Enter a custom slug (3–20 characters) or leave it blank — we'll auto-generate a 4-character one.
The short URL is copied to your clipboard automatically. Share it anywhere.
REST API
A short link is an alias attached to an existing dynamic link — one slug per link, stored on the link itself. There is no separate short-link resource to create or list: you attach a slug to a link and later detach it. Authenticate with an API key (ls_live_…); attaching requires the Pro plan, and calls from Starter accounts return 403 FORBIDDEN_PLAN.
Attach
curl -X POST https://linksense.net/api/v1/projects/$PROJECT_ID/links/$LINK_ID/short-link \ -H "Authorization: Bearer $LINKSENSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "slug": "promo" }' # The body is optional — omit it entirely to get an auto-generated slug:curl -X POST https://linksense.net/api/v1/projects/$PROJECT_ID/links/$LINK_ID/short-link \ -H "Authorization: Bearer $LINKSENSE_API_KEY"| Field | Type | Required | Description |
|---|---|---|---|
slug | string | No | 3–20 chars, lowercase a–z, 0–9, hyphens and underscores allowed (not leading/trailing). Auto-generated as a 4-character base36 string when omitted. |
Successful responses return 201 Created with the slug and its fully-formed short_url:
{ "data": { "dynamic_link_id": "00000000-0000-0000-0000-000000000000", "slug": "promo", "short_url": "https://acme.linksense.net/promo", "short_slug_created_at": "2026-05-25T12:00:00Z" }}409 SLUG_EXISTS. Detach first, then attach the new one. The same code is returned when a slug is taken by another link or by a dynamic link's custom_path — the two share one namespace per project.Detach
curl -X DELETE https://linksense.net/api/v1/projects/$PROJECT_ID/links/$LINK_ID/short-link \ -H "Authorization: Bearer $LINKSENSE_API_KEY"200. Slugs are immutable, so renaming means detach then attach. Historical click attribution remains intact either way.Reading the current slug
There is no short-link list endpoint. The attached slug is a field on the link itself — read short_slug and short_slug_created_at from any links response, and filter the list by exact path with ?custom_path= when you need to check whether one is taken.
curl "https://linksense.net/api/v1/projects/$PROJECT_ID/links?page=1&limit=10" \ -H "Authorization: Bearer $LINKSENSE_API_KEY" # Is "promo" already taken? An empty data array means it is free.curl "https://linksense.net/api/v1/projects/$PROJECT_ID/links?custom_path=promo" \ -H "Authorization: Bearer $LINKSENSE_API_KEY"SDK Resolve
Native apps can expand a short URL into its parent dynamic link payload via the SDK resolve endpoint. The wire contract is live today; convenience methods (resolve(shortURL)) ship in the next minor SDK release per platform.
curl -X POST https://linksense.net/api/sdk/v1/short-links/resolve \ -H "Authorization: Bearer $LINKSENSE_SDK_KEY" \ -H "Content-Type: application/json" \ -d '{ "slug": "promo" }'The response contains the slug echo plus the parent dynamic link in the same shape returned by GET /api/sdk/v1/links/{linkId} — so SDKs can feed it straight into existing routing logic.
404 NOT_FOUND — never 403 — so existence is not leakable across projects.Analytics
Clicks on a short URL roll up to the parent dynamic link's analytics. The Top Links table shows a "Via short" badge per row with the count and most-used slug, so you can see which campaigns are driving traffic without breaking apart the parent link's totals.
via_short_slug shipped show as ungrouped.Slug Rules & Collisions
- 3–20 characters
- Lowercase
a–z, digits0–9, single-or_between alphanumerics - No leading or trailing separators
- Reserved words (e.g.
dashboard,api) are rejected - Unique within a project across both
short_slugandcustom_path— one namespace, two columns ondynamic_links
Collisions return 409 SLUG_EXISTS. Auto-generated slugs retry on collision; the keyspace (1.6M combinations per project at length 4) keeps that practically free.
Pricing
URL shortening is a Pro feature. There is no per-link cap beyond the standard project link limit. Starter accounts see an upgrade prompt in the dashboard and receive 403 FORBIDDEN_PLAN from the REST API.