Documentation

Everything you need to use Flyn, from setting up features in your dashboard to the full REST API and TypeScript SDK.

Base URLhttps://www.flyn.to

Quick Start

Install the SDK and create your first short link in under a minute:

Install
npm install flyn-sdk
TypeScript
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

  1. Sign in to the Flyn dashboard
  2. Go to Settings → API Keys
  3. Click Generate New Key and give it a name
  4. Copy the key immediately, it is only shown once
  5. 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/:id

Links

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/:id

Create 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-create

Click Analytics

Retrieve click events with country, city, device, OS, browser, and referrer breakdowns.

GET /api/links/:id/clicks

Deep Links

Open short links directly in native mobile apps (YouTube, Instagram, TikTok, and 13+ more) instead of the browser.

QR Codes

Render a QR code for any short link, or encode a URL, text, WiFi network, v-card, email, phone number or SMS directly. Every code ships with a spec-compliant quiet zone.

GET /api/links/:id/qrPOST /api/qr

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/pixels

Conversion 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/postback

Domains

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/:id

Webhooks

Subscribe to the four link events: link.click, link.create, link.update and link.delete.

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/shorten

Rate 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.

OpenAPI Spec

A machine-readable OpenAPI description of the public REST API, for generating clients or importing into an API tool.

GET /api/openapi.json

MCP Server

The hosted MCP server AI assistants use to manage links: streamable HTTP transport, OAuth or API key auth, and all eight tools with every input parameter.

POST /mcp

Ready to build?

Get your API key in seconds and start integrating with Flyn.

Get Your API Key

Was this page helpful? Spotted something wrong?