Clypt API Documentation

Build integrations with the Clypt link intelligence platform. Create short links, track analytics, organize with tags and folders — all programmatically.

RESTful API

Standard JSON REST endpoints. Use from any language or platform.

Scoped API Keys

Fine-grained permissions with read/write scopes per resource.

Rich Analytics

Geo, device, browser, and referrer breakdowns with time-series data.

Base URL

https://clypt.io/api/v1

Authentication

All API requests require authentication via a Bearer token. Generate an API key from your Settings page or the POST /api/v1/keys endpoint.

bash
curl -X GET "https://clypt.io/api/v1/links" \
  -H "Authorization: Bearer clypt_your_api_key"

Available Scopes

ScopeDescription
links:readRead links — list, search, get details
links:writeCreate, update, and delete links
analytics:readRead click analytics and performance data
tags:readList tags
tags:writeCreate and manage tags
folders:readList folders
folders:writeCreate and manage folders

Rate Limiting

API key requests are rate-limited. Check the response headers to track your usage:

http
X-RateLimit-Limit: 1000        # Max requests per window
X-RateLimit-Remaining: 987     # Requests remaining
X-RateLimit-Reset: 1710612000  # Window reset (Unix timestamp)

Quick Start

Get up and running in under a minute. Here are examples in popular languages.

cURL

bash
# Shorten a URL
curl -X POST "https://clypt.io/api/v1/links" \
  -H "Authorization: Bearer clypt_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/my-page" }'

JavaScript / TypeScript

typescript
const API_KEY = "clypt_your_api_key";

// Create a short link
const response = await fetch("https://clypt.io/api/v1/links", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com/my-page",
    title: "My Page",
    utmSource: "api",
  }),
});

const link = await response.json();
console.log(link.shortUrl); // https://clypt.io/aBcDeFg

Python

python
import requests

API_KEY = "clypt_your_api_key"
BASE_URL = "https://clypt.io/api/v1"

# Create a short link
response = requests.post(
    f"{BASE_URL}/links",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "url": "https://example.com/my-page",
        "title": "My Page",
    },
)

link = response.json()
print(link["shortUrl"])  # https://clypt.io/aBcDeFg

# Get analytics
analytics = requests.get(
    f"{BASE_URL}/analytics?period=7d",
    headers={"Authorization": f"Bearer {API_KEY}"},
).json()

print(f"Total clicks: {analytics['totalClicks']}")
print(f"Clicks this week: {analytics['clicksInPeriod']}")

Analytics

Retrieve aggregate analytics across all your links — click counts, geographic distribution, device breakdowns, and time-series data.

Tags

Organize links with color-coded tags. Tags can be attached to links at creation time or managed separately.

Folders

Group links into hierarchical folders. Folders support nesting via the parentId field.

API Keys

Manage API keys programmatically. Key creation requires browser session authentication (cannot be done with an API key). You can have up to 10 active keys.

Error Handling

The API uses standard HTTP status codes. Errors return a JSON object with an error field.

json
{
  "error": "url is required"
}
StatusMeaning
200Success
201Resource created
400Bad request — missing or invalid parameters
401Unauthorized — invalid or missing API key
403Forbidden — insufficient scope for this action
404Resource not found
409Conflict — duplicate resource (e.g., custom code taken, tag name exists)
429Rate limit exceeded — slow down and retry after the reset window
500Internal server error — contact support if persistent

MCP Server

Clypt also provides an MCP (Model Context Protocol) server for AI assistant integrations. The MCP server exposes all Clypt functionality as tools that AI assistants can invoke.

Installation

bash
npm install clypt-mcp

Available Tools

shorten_link — Create a shortened URL
list_links — List and search your links
get_link_analytics — Detailed analytics for a link
get_dashboard_stats — Overview statistics
generate_qr_code — Create QR codes
manage_tags — Create, list, update tags
manage_folders — Create, list, update folders
bulk_shorten — Shorten multiple URLs at once
delete_link — Remove a link