API reference
Everything the dashboard does, over HTTP.
The public API shares its validation and its key rules with the UI, so a link created in a loop behaves exactly like one created by hand. Authenticate with a workspace key from Settings. Available on every plan, including free.
Authentication
Send your key as a bearer token. Keys are shown once at creation and stored only as a SHA-256 digest, so a database leak cannot be replayed.
Rate limits
120 requests a minute on Free, 1,200 on Pro, 3,000 on Business, and uncapped on Enterprise. Exceeding the limit returns 429 with a Retry-After header rather than dropping the request silently.
curl -X POST https://shortline.link/api/v1/links \
-H "Authorization: Bearer sl_live_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://northwind.studio/pricing",
"key": "pricing",
"utmSource": "newsletter",
"utmCampaign": "spring-launch",
"ios": "https://apps.apple.com/app/northwind",
"geo": { "DE": "https://northwind.studio/de/pricing" },
"expiresAt": "2026-12-31T23:59:00Z"
}'
# 201 Created
{
"data": {
"id": "8f1c…",
"shortLink": "https://shortline.link/pricing",
"url": "https://northwind.studio/pricing",
"clicks": 0,
"createdAt": "2026-09-12T10:14:22.118Z"
}
}Endpoints
- GET
/api/v1/linksList links in the workspace, with search and pagination.API key - POST
/api/v1/linksCreate a link with any option the dashboard offers.API key - GET
/api/linksList links for the signed-in dashboard session.Session - POST
/api/linksCreate a link from the dashboard.Session - PATCH
/api/links/:idUpdate or archive a link.Session - DELETE
/api/links/:idDelete a link and its click history.Session - GET
/api/links/exportExport every link as CSV.Session - GET
/api/analytics/exportExport every analytics facet as one CSV.Session - POST
/api/track/leadRecord a signup against the link that earned it.API key - POST
/api/track/saleRecord a sale, in cents, against the same link.API key - GET
/api/links/metatagsRead a destination’s Open Graph tags.Public - GET
/api/qrRender a styled QR code as SVG or PNG.Public
Link fields
Every field the link builder exposes is available on create and update.
| Field | Type | Notes |
|---|---|---|
| url | string, required | The destination. A bare hostname is upgraded to https. |
| key | string | The short key. Omit it and one is derived from the page title. |
| title, description, image | string | The custom social card. Set proxy to true to serve it. |
| password | string | Gates the link behind a password, stored hashed. |
| expiresAt, expiredUrl | ISO date, string | When the link stops working, and where late arrivals go. |
| clickLimit | integer | Closes the link after this many clicks. |
| ios, android | string | Per-device destinations, checked before country rules. |
| geo | object | Country code to destination, e.g. { "DE": "https://…" }. |
| variants | array | Up to four extra destinations with a percentage each, minimum ten. |
| utmSource … utmRef | string | Campaign tags written onto the destination at redirect time. |
| tagIds, folderId | uuid | Organisation, matching what the dashboard shows. |
| externalId | string | Your own identifier, so you can find the link again without storing ours. |
Get an API key
Free plan included. No sales call.