ShortGo
RecursosPreços BlogAjudaEntrar
REST · JSON · Webhooks

Construa em cima dos seus links

Crie links com a sua marca, gere QR codes e extraia analytics dos seus próprios apps. Endpoints REST previsíveis, JSON em todo lugar e webhooks para eventos em tempo real.

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

Autenticação

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.

Limites de requisições

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.

Webhooks

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.

Endpoints

URL base

https://shortgo.io/api/v1

Todas as requisições e respostas usam JSON. Os erros retornam uma mensagem "error" com um código de status HTTP significativo. Os endpoints de listagem são paginados com page e per_page.

A referência completa com os esquemas de requisição e resposta está disponível no seu painel.

MétodoEndpointDescrição
GET/linksList links with search and filters
POST/linksCriar um link curto
GET/links/{id}Obter um link
PATCH/links/{id}Update destination, alias or options
DELETE/links/{id}Excluir um link
GET/links/{id}/statsClicks, countries, devices and referrers
GET/qrListar QR codes
POST/qrCreate a dynamic QR code
GET/domainsList your branded domains
GET/campaignsListar campanhas
GET/accountCurrent user and plan usage

Verificar assinaturas de webhooks

Cada entrega inclui os cabeçalhos X-ShortGo-Timestamp e X-ShortGo-Signature. A assinatura é sha256= seguido do HMAC-SHA256 em hexadecimal de "timestamp.body" usando o secret do seu webhook. Compare em tempo constante e rejeite timestamps antigos.

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

Usamos cookies essenciais para o funcionamento deste site. Saiba mais