Create an API key in your account, then call LinkBit with x-api-key or Authorization: Bearer. Public docs never show your keys.
REST API
すべてのリクエストで x-api-key、または Authorization: Bearer slk_... を送ってください。
x-api-key: YOUR_API_KEY Authorization: Bearer YOUR_API_KEY
短いリンクを1件作成。カスタムスラッグは任意(英数字とハイフン、1文字以上)。
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"}'一度に複数作成。失敗は errors に入り、成功分は作成されます。
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"}
]}'このAPIキーの全リンクを新しい順で返します。shortUrl とクリック数を含みます。
curl https://linkbit.live/api/v1/links \ -H "x-api-key: YOUR_API_KEY"
作成または一覧の id を使います。クリック、ユニーク、国、デバイス、リファラ、日次を返します。
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"
アカウント全体の上位リンク、日次、国、デバイス、リファラ。
curl https://linkbit.live/api/v1/analytics \ -H "x-api-key: YOUR_API_KEY"
| フィールド | 場所 | 説明 |
|---|---|---|
| destination | create / bulk | 必須。http(s) URL。別名: url |
| slug | create / bulk | 任意。a-z、0-9、ハイフン。最短1文字。空白はハイフンになります。 |
| utm_source … utm_content | create / bulk / CSV | Optional. Stored on the destination URL. Existing utm_* query params are not overwritten. Hash fragments are kept. |
| urls | bulk body | リンクの配列。別名: links |
| created / errors | bulk response | 成功行と項目ごとの検証エラー(index、message)。 |
認証エラーは401。不正な入力は400。存在しない統計idは404。