ShortGo
機能料金 ブログヘルプログイン
REST · JSON · Webhooks

リンクを基盤に開発

ブランドリンクの作成、QRコードの生成、分析データの取得を自社アプリから実行できます。わかりやすいRESTエンドポイント、あらゆる場面でJSON、リアルタイムイベント用のwebhookを備えています。

POST /links
curl -X POST https://shortgo.io/api/v1/links \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/launch","alias":"launch"}'
const res = await fetch("https://shortgo.io/api/v1/links", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://example.com/launch" }),
});
const { short_url } = await res.json();
import requests

r = requests.post("https://shortgo.io/api/v1/links",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"url": "https://example.com/launch"})
print(r.json()["short_url"])
$ch = curl_init("https://shortgo.io/api/v1/links");
curl_setopt_array($ch, [
  CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer $apiKey", "Content-Type: application/json"],
  CURLOPT_POSTFIELDS => json_encode(["url" => "https://example.com/launch"]),
]);
$link = json_decode(curl_exec($ch), true);
201 Created → {"id": 42, "short_url": "https://go.example/launch", …}

認証

Create an API key in your dashboard and send it as a Bearer token in the Authorization header. Keys can be read-only or read/write and revoked at any time.

レート制限

Limits depend on your plan (requests per minute). Every response includes X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers; exceeding the limit returns 429.

webhook

Subscribe to link.created, link.clicked, link.deleted and overlay.response events. Payloads are signed with HMAC-SHA256 so you can verify they came from us.

エンドポイント

ベースURL

https://shortgo.io/api/v1

すべてのリクエストとレスポンスはJSONを使用します。エラー時は適切なHTTPステータスコードとともに"error"メッセージが返されます。一覧エンドポイントはpageとper_pageでページネーションされます。

リクエストとレスポンスのスキーマを含む完全なリファレンスは、ダッシュボードでご覧いただけます。

方法エンドポイント説明
GET/linksList links with search and filters
POST/links短縮リンクを作成
GET/links/{id}リンクを取得
PATCH/links/{id}Update destination, alias or options
DELETE/links/{id}リンクを削除
GET/links/{id}/statsClicks, countries, devices and referrers
GET/qrQRコード一覧
POST/qrCreate a dynamic QR code
GET/domainsList your branded domains
GET/campaignsキャンペーン一覧
GET/accountCurrent user and plan usage

webhook署名を検証

各配信にはX-ShortGo-TimestampとX-ShortGo-Signatureヘッダーが含まれます。署名は「sha256=」に続けて、webhookシークレットを使った"timestamp.body"のHMAC-SHA256(16進数)を連結したものです。定数時間で比較し、古いタイムスタンプは拒否してください。

{
  "event": "link.clicked",
  "created_at": "2026-01-01T12:00:00Z",
  "data": {
    "link_id": 42,
    "country": "DE",
    "device": "mobile",
    "referrer": "instagram.com"
  }
}

このサイトの運営に必要なCookieを使用しています。 詳しく見る