API Documentation

REST API to create, manage, and track short links. Authenticate with an API key (Pro/Business).

Authentication

All protected endpoints require an API key in the header:

x-api-key: your_api_key_here

API keys can be generated at Dashboard > Settings (Pro/Business).

Base URL

https://cut2.link

Endpoints

GET/api/linksAPI-Key

List all links

Parameters

?tag=...&bioPageId=...
POST/api/linksAPI-Key

Create a new short link

Request Body

{
  "url": "https://example.com",
  "slug": "custom-slug",
  "title": "My Link",
  "tags": "marketing",
  "utmSource": "newsletter",
  "utmMedium": "email",
  "utmCampaign": "launch",
  "startsAt": "2026-04-01T00:00:00Z",
  "expiresAt": "2026-05-01T00:00:00Z",
  "noIndex": true,
  "password": "secret123"
}
GET/api/links/:idAPI-Key

Get a single link

PATCH/api/links/:idAPI-Key

Update a link

Request Body

{
  "url": "https://new-url.com",
  "title": "Updated Title",
  "isActive": false,
  "utmSource": "twitter",
  "noIndex": true,
  "password": "secret123"
}
DELETE/api/links/:idAPI-Key

Delete a link (soft delete)

GET/api/links/:id/statsAPI-Key

Get click statistics

Parameters

?days=30

Response

{
  "link": { "id": "...", "slug": "abc", "url": "..." },
  "period": { "days": 30, "since": "2026-03-02" },
  "total": 142,
  "byDay": { "2026-04-01": 12, "2026-04-02": 8 },
  "byCountry": { "DE": 80, "US": 30 },
  "byDevice": { "mobile": 90, "desktop": 52 },
  "byBrowser": { "Chrome": 70, "Safari": 40 },
  "byReferrer": { "google.com": 30, "direct": 50 }
}
GET/api/links/:id/qr

Generate QR code

Parameters

?size=300&format=svg&fg=000000&bg=ffffff
GET/api/bioAPI-Key

List all bio pages

POST/api/bioAPI-Key

Create a bio page

Request Body

{
  "slug": "mypage",
  "title": "My Bio",
  "bio": "Welcome to my page",
  "theme": "dark"
}
GET/api/health

Health check

Quick Start

Create a link via cURL

curl -X POST https://cut2.link/api/links \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "https://example.com", "slug": "my-link"}'

Rate Limits

Pro

Unlimited links

50.000 clicks/month

Business

Everything unlimited

5 Custom Domains

QR

Public

No API key required