Browse docs

API v1 reference

Authenticate with a workspace API key (Pro). Keys are shown once at creation; only a SHA-256 hash is stored.

Authentication

Authorization: Bearer lt_<secret>

Create a key from the Dashboard (Pro) or via POST /api/workspace/api-keys with your Clerk session.

List links

GET /api/v1/links
Authorization: Bearer lt_...

200{ "links": [ ... ] }(full link rows for the key's workspace, newest first).

Create link

POST /api/v1/links
Authorization: Bearer lt_...
Content-Type: application/json

{
  "destinationUrl": "https://example.com/page",
  "quickShorten": true
}

Or full preview fields (same as app API):

{
  "destinationUrl": "https://example.com/page",
  "botTitle": "Title for crawlers",
  "botDescription": "Description for crawlers",
  "ogImageUrl": "https://cdn.example.com/card.png",
  "campaign": "spring",
  "utmSource": "newsletter",
  "utmMedium": "email",
  "utmCampaign": "apr",
  "expiresAt": "2026-12-31T23:59:59.000Z",
  "isActive": true
}

200 { "id", "slug", "shortUrl", "botTitle", "botDescription", "ogImageUrl" }. Subject to monthly quota and rate limits.

Update link

PATCH /api/v1/links/{id}
Authorization: Bearer lt_...
Content-Type: application/json

{
  "botTitle": "New title",
  "isActive": false
}

Updatable fields mirror the session API: destination, bot meta, image, campaign, notes, utm_*, isActive, expiresAt.

Delete link

DELETE /api/v1/links/{id}
Authorization: Bearer lt_...

Error responses

  • 401 — missing or invalid Bearer token.
  • 403 — monthly quota exceeded (body may include used/limit).
  • 429 — rate limit.
  • 404 — link id not in workspace.