LinkBit

API documentation

Create an API key in your account, then call LinkBit with x-api-key or Authorization: Bearer. Public docs never show your keys.

How to Use

REST API

Send the key on every request in x-api-key or as Authorization: Bearer slk_...

x-api-key: YOUR_API_KEY
Authorization: Bearer YOUR_API_KEY

Request Examples

▸Shorten URL (Single)

Create one short link. Custom slug is optional (letters, numbers, hyphens, 1+ characters).

curl -X POST https://linkbit.live/api/v1/links \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"destination": "https://example.com/long-url", "slug": "my-link", "utm_source": "newsletter"}'
▸Bulk Shorten URLs (up to 100 on your plan)

Create many links in one request. Failed items are returned in errors; valid ones still get created.

curl -X POST https://linkbit.live/api/v1/links/bulk \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"urls": [
    {"destination": "https://example.com/page1"},
    {"destination": "https://example.com/page2", "slug": "my-custom-slug"}
  ]}'
▸List Links

Returns every short link for this API key, newest first, including shortUrl and click counts.

curl https://linkbit.live/api/v1/links \
  -H "x-api-key: YOUR_API_KEY"
▸Get Click Stats

Use the id from create or list. Returns clicks, unique visitors, countries, devices, referrers, and daily totals.

curl "https://linkbit.live/api/v1/links/LINK_ID/stats?from=2026-01-01&to=2026-01-31" \
  -H "x-api-key: YOUR_API_KEY"
▸Analytics Overview

Account-level summary: top links, daily stats, countries, devices, and referrers.

curl https://linkbit.live/api/v1/analytics \
  -H "x-api-key: YOUR_API_KEY"

Field reference

FieldWhereNotes
destinationcreate / bulkRequired. http(s) URL. Alias: url
slugcreate / bulkOptional. a-z, 0-9, hyphen. Min 1 character. Spaces become hyphens.
utm_source … utm_contentcreate / bulk / CSVOptional. Stored on the destination URL. Existing utm_* query params are not overwritten. Hash fragments are kept.
urlsbulk bodyArray of links. Alias: links
created / errorsbulk responseSuccessful rows and per-item validation errors (index, message).

Auth errors return 401. Invalid input or daily create limit returns 400. Missing id returns 404. Unsafe or blocked destinations are rejected.