Documentation
Integrate Fstly’s secure link platform: API keys, short links, QR codes, and analytics. Need help? Contact sales or review security.
Getting started
What is Fstly?
Fstly is an API-first link management platform. You create branded short URLs, dynamic QR codes, and stream analytics events— with optional PII scanning on outbound destinations before links go live.
Quick start
- Create a workspace and generate an API key from the dashboard (Pro or Enterprise for production limits).
- Call
POST /v1/linkswith your destination URL. - Attach UTM parameters or enable QR export from the response payload metadata.
Authentication
All API requests require a bearer token issued from your workspace. Rotate keys periodically and scope automation with separate keys per environment (staging vs production).
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonNever commit API keys to source control. Use a secrets manager or CI injected variables.
Create a short link
Creates a managed short URL with optional slug, expiry, and domain.
curl -X POST https://api.fstly.example/v1/links \
-H "Authorization: Bearer $NEXLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "https://example.com/product/summer",
"domain": "go.yourbrand.com",
"slug": "summer-drop",
"expires_at": "2026-12-31T23:59:59Z"
}'const res = await fetch("https://api.fstly.example/v1/links", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NEXLINK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
destination: "https://example.com/product/summer",
domain: "go.yourbrand.com",
slug: "summer-drop",
}),
});
const link = await res.json();
console.log(link.short_url);QR generation
Request a QR asset for an existing short link ID. Export formats include SVG and high-resolution PNG for print.
curl -X POST https://api.fstly.example/v1/qr \
-H "Authorization: Bearer $NEXLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"link_id": "lnk_abc123",
"format": "svg",
"logo_url": "https://cdn.yourbrand.com/logo.svg"
}'Analytics
Fetch aggregated click metrics for a link or workspace. Responses include coarse geo (e.g., city/region), device class, and referrer where available—aligned with your workspace privacy settings.
curl -G https://api.fstly.example/v1/analytics/clicks \
-H "Authorization: Bearer $NEXLINK_API_KEY" \
--data-urlencode "link_id=lnk_abc123" \
--data-urlencode "from=2026-04-01" \
--data-urlencode "to=2026-04-11"