Forwrd API
A small REST API for creating and reading your own short links.
Get an API keyAuthentication
Create a key in your account and send it as a bearer token. Keys act as you, so they only see your own links.
Authorization: Bearer forwrd_xxxxxxxxxxxxEndpoints
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- requiredslug- optional, a-z 0-9 and hyphen, 2-32 charsexpires_at- optional ISO 8601 timestampmax_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.
Rate limit
60 requests per minute per key. Above that you get HTTP 429.
Errors
Errors return JSON with an error field: 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