Costruisci a partire dai tuoi link
Crea link brandizzati, genera QR code e ottieni analisi dalle tue app. Endpoint REST prevedibili, JSON ovunque e webhook per gli eventi in tempo reale.
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);
Autenticazione
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.
Limiti di frequenza
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.
Endpoint
URL di base
Tutte le richieste e risposte usano JSON. Gli errori restituiscono un messaggio "error" con un codice di stato HTTP significativo. Gli endpoint di elenco sono paginati con page e per_page.
Il riferimento completo con gli schemi di richiesta e risposta è disponibile nella tua dashboard.
| Metodo | Endpoint | Descrizione |
|---|---|---|
| GET | /links | List links with search and filters |
| POST | /links | Crea un link breve |
| GET | /links/{id} | Recupera un link |
| PATCH | /links/{id} | Update destination, alias or options |
| DELETE | /links/{id} | Elimina un link |
| GET | /links/{id}/stats | Clicks, countries, devices and referrers |
| GET | /qr | Elenca QR code |
| POST | /qr | Create a dynamic QR code |
| GET | /domains | List your branded domains |
| GET | /campaigns | Elenca campagne |
| GET | /account | Current user and plan usage |
Verifica le firme dei webhook
Ogni consegna include gli header X-ShortGo-Timestamp e X-ShortGo-Signature. La firma è sha256= seguito dall'HMAC-SHA256 esadecimale di "timestamp.body" calcolato con il tuo secret del webhook. Confrontala in tempo costante e rifiuta i timestamp vecchi.
{
"event": "link.clicked",
"created_at": "2026-01-01T12:00:00Z",
"data": {
"link_id": 42,
"country": "DE",
"device": "mobile",
"referrer": "instagram.com"
}
}