Skip to main content

Developer docs

Build with the LeonAI Links API

Create and manage short links, read click analytics, receive signed webhooks, generate QR codes and build link-in-bio pages, over plain HTTP with an OpenAPI 3.1 spec.

Base URL
https://api.short.leonai.io/api/v1
Auth
X-API-Key or a Bearer JWT
Create a linkPOST /api/v1/links
curl -X POST https://api.short.leonai.io/api/v1/links \
  -H "X-API-Key: $LEONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"longUrl": "https://example.com/spring-sale",
       "shortCode": "spring-sale"}'

# 201 Created
"shortUrl": "https://short.leonai.io/spring-sale"

What's inside

One REST API for links, analytics and automation

Fast redirects, real-time analytics

Edge redirects from Cloudflare's global network, backed by aggressive caching, with click analytics, real-time stats, and conversion attribution via the lc_id flow.

Analytics guide

An OpenAPI 3.1 spec

Generate a typed client for your language from the spec. A TypeScript SDK and an MCP server for AI assistants are on the way.

API reference

Webhooks, QR, domains, teams

HMAC-signed webhooks, dynamic QR codes, custom domains, link-in-bio pages, smart routing, and team collaboration — all through one REST API.

Webhooks guide