Forwrd.us

Forwrd API

Et lite REST-API for å opprette og lese dine korte lenker.

Få en API-nøkkel

Autentisering

Opprett en nøkkel i kontoen og send den som bearer-token. Den handler som deg og ser bare dine lenker.

Authorization: Bearer forwrd_xxxxxxxxxxxx

Endepunkter

POST /api/public/v1/shorten

curl -X POST https://forwrd.us/api/public/v1/shorten \
  -H "Authorization: Bearer forwrd_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"url":"example.com/a-long-page","slug":"launch","max_clicks":500}'
{
  "slug": "launch",
  "short_url": "https://forwrd.us/launch",
  "url": "https://example.com/a-long-page",
  "reused": false
}
  • url - required
  • slug - optional, a-z 0-9 and hyphen, 2-32 chars
  • expires_at - optional ISO 8601 timestamp
  • max_clicks - optional integer

GET /api/public/v1/links

curl https://forwrd.us/api/public/v1/links?limit=50 \
  -H "Authorization: Bearer forwrd_xxxxxxxxxxxx"

limit (1-200) and offset query params.

Ratebegrensning

60 kall per minutt per nøkkel. Over det får du HTTP 429.

Feil

Feil returnerer JSON med et error-felt: invalid_url, blocked_abuse, slug_taken, unauthorized, rate_limited.

401 unauthorized · 429 rate_limited · 400 invalid_url | invalid_body | slug_invalid | blocked_abuse · 409 slug_taken