Shortlink

API reference

Everything in the dashboard is available through the REST API. Create an API key under Workspace → Settings → API keys and send it as a Bearer token.

Authentication

curl https://adssakti.store/api/links \
  -H "Authorization: Bearer sl_xxxxxxxxxxxxxxxx"

API keys are scoped to a workspace, so no workspaceId is needed. When calling the API from the browser with your session cookie, pass ?workspaceId=<id or slug>.

Create a link

curl -X POST https://adssakti.store/api/links \
  -H "Authorization: Bearer sl_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/launch",
    "key": "launch",
    "tagNames": ["marketing"],
    "expiresAt": "2027-01-01T00:00:00Z",
    "geo": { "DE": "https://example.de/launch" },
    "utm_source": "newsletter"
  }'

Errors

Errors use a consistent envelope and standard status codes (400, 401, 403, 404, 409, 422, 429, 500):

{ "error": { "code": "conflict", "message": "Key \"launch\" already exists on adssakti.store." } }

Webhooks

Payload: { id, event, createdAt, data }. Verify the X-Webhook-Signature header: HMAC-SHA256 of the raw body using your endpoint secret, hex encoded.

Endpoints

GET/api/linkslinks.read

List links. Query: search, domain, tagIds, folderId, showArchived, sortBy, page, pageSize. Total in X-Total-Count header.

POST/api/linkslinks.write

Create a link. Body: url (required), domain, key, prefix, tagIds/tagNames, folderId, comments, expiresAt, expiredUrl, password, proxy+title/description/image, rewrite, doIndex, publicStats, ios, android, geo, utm_*, testVariants, externalId.

GET/api/links/{linkId}links.read

Retrieve a link by id (or ext_<externalId>).

PATCH/api/links/{linkId}links.write

Update a link (same fields as create).

DELETE/api/links/{linkId}links.write

Delete a link.

POST/api/links/bulklinks.write

Create up to 100 links. Body: array of link objects.

PATCH/api/links/bulklinks.write

Update many links. Body: { linkIds, data }.

DELETE/api/links/bulklinks.write

Delete many links. Query: linkIds=a,b,c

GET/api/links/countlinks.read

Count links; optional groupBy=domain|tagId|userId|folderId.

GET/api/links/existslinks.read

Check key availability. Query: domain, key.

GET/api/links/infolinks.read

Retrieve by domain+key, linkId or externalId.

GET/api/links/randomlinks.read

Generate an unused random key.

GET/api/links/exportlinks.read

CSV export of links.

GET/api/analyticsanalytics.read

Analytics. Query: groupBy=count|timeseries|countries|cities|regions|continents|devices|browsers|os|triggers|referers|referer_urls|top_links|top_urls|utm_*; interval=24h|7d|30d|90d|1y|ytd|all or start/end; filters: linkId, externalId, domain, tagId, folderId, country, city, device, browser, os, referer, url, utm_*.

GET/api/domainsdomains.read

List custom domains (includes DNS verification records).

POST/api/domainsdomains.write

Add a domain. Body: slug, placeholder, expiredUrl, notFoundUrl.

PATCH/api/domains/{slug}domains.write

Update domain settings / archive / set primary.

DELETE/api/domains/{slug}domains.write

Remove a domain and its links.

POST/api/domains/{slug}/verifydomains.write

Check the DNS TXT record and mark the domain verified.

GETPOST/api/tagstags.*

List / create tags. Body: name, color.

PATCHDELETE/api/tags/{id}tags.write

Update / delete a tag.

GETPOST/api/folderslinks.*

List folders you can read (includeRestricted=true lists all) / create one (you become its owner). Body: name, description, accessLevel (read|write|null).

GETPATCHDELETE/api/folders/{id}links.*

Detail with members / update name, description, accessLevel / delete (folder owner or workspace owner).

GETPUTDELETE/api/folders/{id}/userslinks.*

Folder members: list / upsert { userId, role: owner|editor|viewer } / remove (query userId).

POSTGETPATCH/api/folders/{id}/access-requestslinks.*

Request access for yourself / list pending requests / approve or deny { userId, approve, role? }.

GETPOST/api/utm

List / create UTM templates.

GETPOST/api/workspaces

List your workspaces / create one. Body: name, slug.

GETPATCHDELETE/api/workspaces/{idOrSlug}

Retrieve / update / delete a workspace.

GETPATCHDELETE/api/workspaces/{idOrSlug}/users

Members: list, change role, remove (query userId).

GETPOSTPUTDELETE/api/workspaces/{idOrSlug}/invites

Email invites and the shareable invite link (PUT regenerates).

GETPOST/api/tokens

List / create API keys (key returned once).

GETPOST/api/webhooks

List / create webhooks. Body: name, url, triggers[].

GET/api/qr

QR code image. Query: url, size, fgColor, bgColor, level, format=png|svg. Public.

GET/api/metatags

OG title/description/image for a URL. Public.

POST/api/abuse

Submit an abuse report. Body: name, email, url, category, reason. Public, rate limited.

Redirect behaviour

Shortlink API v1