Porto Short API

Create a key in your settings and send it as a bearer token. All responses are JSON.

Authentication

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx

POST /api/public/v1/links — create a link

curl -X POST https://your-domain/api/public/v1/links \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"destination_url":"https://example.com","alias":"launch","title":"Launch post"}'

{ "id": "...", "short_code": "launch", "short_url": "https://your-domain/launch",
  "destination_url": "https://example.com" }

GET /api/public/v1/links — list your links

curl https://your-domain/api/public/v1/links \
  -H "Authorization: Bearer sk_live_..."

{ "links": [ { "id": "...", "short_code": "launch", "clicks": 42, "status": "active" } ] }

GET /api/public/v1/links/{id} — link detail and clicks

curl https://your-domain/api/public/v1/links/LINK_ID \
  -H "Authorization: Bearer sk_live_..."

{ "link": { ... }, "clicks": 42 }

DELETE /api/public/v1/links/{id} — delete a link

curl -X DELETE https://your-domain/api/public/v1/links/LINK_ID \
  -H "Authorization: Bearer sk_live_..."

{ "ok": true }

Errors return an HTTP status plus { "error": "message" }. Link creation is rate limited to 100 links per hour.