Roxera Link Roxera Link
terminal

Roxera Link API Reference

REST API v1 • Base URL: https://link-api.s-g.lol/v1
vpn_key

Authentication & Rate Limits

Requests to protected endpoints must include either a Firebase ID Token in the Authorization header or an API Key generated in your dashboard:

Firebase ID Token
Authorization: Bearer <id_token>
API Key (Dashboard)
X-Api-Key: <api_key>
speed 60 req/min per key public 10 creates/min per IP
POST /v1/links
Auth: Bearer / X-Api-Key

Create a new shortened link with optional custom slug, domain, or expiration.

curl -X POST "https://link-api.s-g.lol/v1/links" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -d '{"targetUrl": "https://example.com/long-page", "slug": "my-page"}'
201 Created: {"id": "...", "slug": "my-page", "shortUrl": "https://link.s-g.lol/my-page"}
GET /v1/links/:id/stats
Auth: Bearer / X-Api-Key

Retrieve aggregated click statistics, daily trends, and breakdown by country & device.

curl -X GET "https://link-api.s-g.lol/v1/links/LINK_ID/stats" \
  -H "Authorization: Bearer <FIREBASE_ID_TOKEN>"
200 OK: {"total": 42, "byCountry": {"US": 25, "DE": 17}, "recent": [...]}
PATCH /v1/links/:id
Auth: Bearer / X-Api-Key

Update title, target URL, active status or expiration time of an existing link.

curl -X PATCH "https://link-api.s-g.lol/v1/links/LINK_ID" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -d '{"title": "Updated Title", "isActive": true}'
200 OK: {"ok": true}
DELETE /v1/links/:id
Auth: Bearer / X-Api-Key

Permanently remove a shortened link and its redirect routing.

curl -X DELETE "https://link-api.s-g.lol/v1/links/LINK_ID" \
  -H "X-Api-Key: your_api_key"
200 OK: {"ok": true}
POST /v1/report
Auth: None (Public)

Public rate-limited endpoint for reporting phishing, malware, or abuse.

curl -X POST "https://link-api.s-g.lol/v1/report" \
  -H "Content-Type: application/json" \
  -d '{"targetUrl": "https://suspicious.site", "reason": "Phishing"}'
200 OK: {"ok": true}

OpenAPI 3.0 Specification

open_in_new openapi.json
null