Documentation
Everything you need to use Flyn, from setting up features in your dashboard to the full REST API and TypeScript SDK.
https://www.flyn.toQuick Start
Install the SDK and create your first short link in under a minute:
npm install flyn-sdk
import { Flyn } from 'flyn-sdk';
const flyn = new Flyn({ apiKey: 'flyn_sk_live_...' });
// Create a short link
async function generateLink() {
const link = await flyn.links.create({
url: 'https://example.com/my-long-url',
slug: 'my-campaign',
domain: 'go.yourcompany.com',
tags: ['marketing', 'q1-2026'],
});
console.log(link.shortUrl);
}
generateLink();
// → https://go.yourcompany.com/my-campaign
// Get click analytics
async function getClicks(linkId: string) {
const res = await flyn.links.clicks(linkId, {
limit: 100,
});
res.data.forEach((c: any) => console.log(c.country, c.device));
}
getClicks('your-link-id');Getting Your API Key
- Sign in to the Flyn dashboard
- Go to Settings → API Keys
- Click Generate New Key and give it a name
- Copy the key immediately, it is only shown once
- Add it to your environment variables or secrets manager
Never expose API keys in client-side code. Use them only in server-side code, environment variables, or secrets managers.
API Reference
Authentication
API keys, Bearer tokens, and how to create/revoke keys.
POST /api/keysGET /api/keysDELETE /api/keys/:idLinks
Create, update, delete, and list short links with full control over slugs, tags, targeting, and OG metadata.
POST /api/linksGET /api/linksGET /api/links/:idPATCH /api/links/:idDELETE /api/links/:idCreate Many Links
Generate up to 50 unique short links for a single destination in one call, each with its own analytics, grouped by a shared tag. Built for Pinterest, Tailwind, and per-placement tracking.
POST /api/links/bulk-createClick Analytics
Retrieve click events with country, city, device, OS, browser, and referrer breakdowns.
GET /api/links/:id/clicksDeep Links
Open short links directly in native mobile apps (YouTube, Instagram, TikTok, and 13+ more) instead of the browser.
Retargeting Pixels
Attach ad pixels (Meta, Google, LinkedIn, TikTok, and 9 more) to any link, fire them on click, and build remarketing audiences.
POST /api/pixelsGET /api/pixelsDELETE /api/pixelsConversion Tracking
Report signups and sales back to the link that earned them, from the browser tag or a server-to-server postback.
POST /api/conversionGET /api/postbackDomains
Add, verify, update, and delete custom branded domains with DNS instructions.
POST /api/domains/addGET /api/domainsPOST /api/domains/:id/verifyPATCH /api/domains/:idDELETE /api/domains/:idWebhooks
Subscribe to real-time events: link.click, link.create, link.update, link.delete, and more.
POST /api/webhooksGET /api/webhooksPATCH /api/webhooks/:idDELETE /api/webhooks/:idPOST /api/webhooks/:id (test)Quick Shorten
Simplified URL shortening. Works with or without auth, anonymous links expire in 48 hours.
POST /api/shortenRate Limits
Per-endpoint rate limits, response headers, progressive penalties, and best practices.
Errors
HTTP status codes, error response format, and a complete reference of every error message.
Was this page helpful? Spotted something wrong?