ShortGo
FunkcjeCennik BlogPomocZaloguj się
REST · JSON · Webhooks

Buduj na bazie swoich linków

Twórz markowe linki, generuj kody QR i pobieraj analitykę z własnych aplikacji. Przewidywalne endpointy REST, wszędzie JSON i webhooki dla zdarzeń w czasie rzeczywistym.

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", …}

Uwierzytelnianie

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.

Limity żądań

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.

Webhooki

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.

Endpointy

Bazowy URL

https://shortgo.io/api/v1

Wszystkie żądania i odpowiedzi używają formatu JSON. Błędy zwracają komunikat "error" z odpowiednim kodem statusu HTTP. Endpointy list są stronicowane za pomocą parametrów page i per_page.

Pełna dokumentacja ze schematami żądań i odpowiedzi jest dostępna w Twoim panelu.

MetodaEndpointOpis
GET/linksList links with search and filters
POST/linksUtwórz krótki link
GET/links/{id}Pobierz link
PATCH/links/{id}Update destination, alias or options
DELETE/links/{id}Usuń link
GET/links/{id}/statsClicks, countries, devices and referrers
GET/qrWyświetl kody QR
POST/qrCreate a dynamic QR code
GET/domainsList your branded domains
GET/campaignsWyświetl kampanie
GET/accountCurrent user and plan usage

Weryfikuj podpisy webhooków

Każde dostarczenie zawiera nagłówki X-ShortGo-Timestamp i X-ShortGo-Signature. Podpis ma postać sha256= i następujący po nim szesnastkowy HMAC-SHA256 z "timestamp.body" przy użyciu sekretu webhooka. Porównuj go w stałym czasie i odrzucaj stare znaczniki czasu.

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

Używamy niezbędnych plików cookie do działania tej witryny. Dowiedz się więcej