OpenAPI Specification
A machine-readable OpenAPI 3.1 description of the Flyn REST API, for importing into API clients, browsing the operations it describes, and generating client code in your own language.
3.1.0
OpenAPI version
29
Operations
17
Paths
5
Webhook events
What the spec covers
Flyn publishes an OpenAPI 3.1.0 description of its REST API at https://www.flyn.to/api/openapi.json. It is written against the same API routes these docs describe, and a build check (scripts/verify-openapi.mjs) fails if any path or method in it has no matching route. The operation and event tables further down this page are built from the same file you download.
- 29 operations on 17 paths, grouped as Links, Quick Shorten, QR Codes, Click Analytics, Domains, Retargeting Pixels, Conversion Tracking, Webhooks.
- The 5 webhook events Flyn sends to your endpoint, in the top-level
webhooksobject that OpenAPI 3.1 added for requests your server receives. - The authentication scheme each operation accepts.
- 54 reusable schemas for request bodies, responses and webhook payloads.
Requests go to https://www.flyn.to, and this is version 1.0.0 of the document. The prose pages linked below remain the place for walkthroughs, limits and examples.
Loading it into your tools
Most tools that read OpenAPI 3.1 can use the spec URL or the downloaded file. A few common options, listed as examples rather than recommendations:
- Postman: choose Import and paste the spec URL into the import field. Postman builds a collection of requests from it.
- Insomnia: open the import dialog, pick the URL option, and paste the same address (or import the downloaded file).
- Swagger Editor or Redocly: load the URL or the file to browse operations, parameters and schemas as rendered reference pages.
- openapi-generator: generate a typed client for the language you work in (example below).
Support for OpenAPI 3.1 varies between tools and versions, so if one rejects the file, try another. Flyn is not affiliated with any of them. After importing, set the Authorization header to Bearer flyn_sk_live_... at the collection or environment level.
# The generator CLI downloads a Java jar, so it needs a Java runtime. npx @openapitools/openapi-generator-cli generate \ -i https://www.flyn.to/api/openapi.json \ -g python \ -o ./flyn-client
Authentication
- API key. Send
Authorization: Bearer flyn_sk_live_.... Keys are created in Settings, API on the Pro, Lifetime or Team plan (members of a paying owner's team get Team access). See Authentication for creating and revoking keys. - Dashboard session. Some routes also accept the signed-in session cookie of the Flyn dashboard, which is how the dashboard itself calls them. From a server or script, use an API key.
- MCP OAuth tokens. Access tokens issued to an MCP client through OAuth (
Bearer flyn_mcp_at_...). Besides the MCP endpoint itself (/mcp), they are accepted by these operations in the spec:GET /api/links,POST /api/links,GET /api/links/{id}/clicks,GET /api/links/{id}/qr,POST /api/qrandPOST /api/shorten. Every other operation in this spec that requires credentials answers 401 to them. Connecting an MCP client with OAuth works on every plan, see the MCP server page. - No credentials. The conversion ingest routes take the click id as their credential, and quick shorten also works without an account. The operations table marks these as No auth and Auth optional.
The schemes as the spec declares them:
| Field | Type | Description |
|---|---|---|
| bearerAuth | http bearer (flyn_sk_live_<64 hex>) | API key sent as Authorization: Bearer flyn_sk_live_<64 hex> (the prefix is case-sensitive). Create keys in Settings > API Keys on a Pro, Lifetime or Team plan. OAuth access tokens issued to MCP clients (Bearer flyn_mcp_at_..., every plan) are accepted only by GET and POST /api/links, GET /api/links/{id}/clicks, GET /api/links/{id}/qr, POST /api/qr and POST /api/shorten; every other authenticated endpoint answers 401 to them (the conversion ingest endpoints need no authentication and ignore the header). |
Errors and status codes are covered on Errors, and most per-route limits on Rate Limits; each operation's description in the spec states its own limit.
Operations
Every operation in the spec, grouped by tag. Each group links to the page that explains it in prose. Unmarked operations need credentials: an API key, or where accepted, an MCP OAuth token (the operations listed under Authentication) or a dashboard session.
Links
Read the Links guideCreate, list, read, update and delete short links one at a time, or create 2 to 50 links for one destination with bulk-create.
| Method | Path | Summary |
|---|---|---|
| GET | /api/links | List links |
| POST | /api/links | Create a link |
| GET | /api/links/{id} | Get a link |
| PATCH | /api/links/{id} | Update a link |
| DELETE | /api/links/{id} | Delete a link |
| POST | /api/links/bulk-create | Create many links to one destination Create Many Links guide |
Quick Shorten
Read the Quick Shorten guideMinimal shortener that also works without an account.
| Method | Path | Summary |
|---|---|---|
| POST | /api/shorten | Quick shorten a URLAuth optional |
QR Codes
Read the QR Codes guideQR codes for your short links, and a stateless encoder for URLs, text, Wi-Fi, vCards, email, phone and SMS.
| Method | Path | Summary |
|---|---|---|
| GET | /api/links/{id}/qr | Get a QR code for a link |
| POST | /api/qr | Encode content as a QR code |
Click Analytics
Read the Click Analytics guideRaw human click events per link.
| Method | Path | Summary |
|---|---|---|
| GET | /api/links/{id}/clicks | List clicks for a link |
Domains
Read the Domains guideCustom domains for branded short links.
| Method | Path | Summary |
|---|---|---|
| GET | /api/domains | List custom domains |
| POST | /api/domains/add | Add a custom domain |
| PATCH | /api/domains/{id} | Update domain settings |
| DELETE | /api/domains/{id} | Delete a custom domain |
| POST | /api/domains/{id}/verify | Verify a custom domain |
Retargeting Pixels
Read the Retargeting Pixels guideSaved ad-platform pixels that fire when a link is clicked.
| Method | Path | Summary |
|---|---|---|
| GET | /api/pixels | List retargeting pixels |
| POST | /api/pixels | Save a retargeting pixel |
| PATCH | /api/pixels | Edit a retargeting pixel |
| DELETE | /api/pixels | Delete a retargeting pixel |
Conversion Tracking
Read the Conversion Tracking guideRecord conversions against a click id and read the conversion report.
| Method | Path | Summary |
|---|---|---|
| GET | /api/conversion | Record a conversion (GET)No auth |
| POST | /api/conversion | Record a conversion (POST)No auth |
| GET | /api/postback | Record a conversion via postback (GET)No auth |
| POST | /api/postback | Record a conversion via postback (POST)No auth |
| GET | /api/conversions | Get the conversion report |
Webhooks
Read the Webhooks guideSigned HTTP callbacks for link clicks and link changes.
| Method | Path | Summary |
|---|---|---|
| GET | /api/webhooks | List webhooks |
| POST | /api/webhooks | Create a webhook |
| POST | /api/webhooks/{id} | Send a test delivery |
| PATCH | /api/webhooks/{id} | Update a webhook |
| DELETE | /api/webhooks/{id} | Delete a webhook |
Webhook events
The events below come from the spec's webhooks object. Each one is an HTTP POST Flyn sends to an endpoint you register. Signing, delivery headers and payload examples are on the Webhooks page.
| Event | Summary |
|---|---|
| link.click | A human clicked a link |
| link.create | A link was created |
| link.update | A link was edited |
| link.delete | A link was deleted |
| webhook.test | Test delivery |
SDK
Flyn's own client library is the TypeScript package flyn-sdk on npm. For any other language, generate a client from this spec with openapi-generator or a similar tool, as shown above.
npm install flyn-sdk
Was this page helpful? Spotted something wrong?