Developer API

A clean REST API for creating and managing links programmatically. Authenticate with a private key, scope your access, and replay requests safely with idempotency keys.

Authentication

All endpoints require a Bearer token. API keys are created in your dashboard and are only shown once — we store only a hash.

Authorization: Bearer lm_pk_your_private_key
Endpoints
MethodPathDescription
POST/api/v1/linksCreate a short link
GET/api/v1/linksList your links (paginated, filterable)
GET/api/v1/links/{id}Get a single link
PATCH/api/v1/links/{id}Update destination, title, status, expiry
DELETE/api/v1/links/{id}Soft-delete a link
GET/api/v1/accountAccount and subscription info
GET/api/v1/analyticsAggregated analytics
GET/api/v1/usagePlan capacity and API usage
Create a link
curl -X POST https://titon.ftp.sh/api/v1/links \
  -H "Authorization: Bearer lm_pk_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "destination_url": "https://example.com/landing",
    "custom_alias": "launch-2026",
    "title": "Launch campaign",
    "expires_at": "2026-12-31T23:59:59Z"
  }'

HTTP/1.1 201 Created
{
  "data": {
    "id": 42,
    "code": "launch-2026",
    "short_url": "https://titon.ftp.sh/launch-2026",
    "destination_url": "https://example.com/landing",
    "status": "active",
    "created_at": "2026-11-12T07:30:00Z"
  }
}

Idempotency

Send an Idempotency-Key header with POST requests. Replaying the same key returns the original response instead of creating a duplicate link. Keys expire after 24 hours.

Rate limits & errors

Each key has a per-minute rate limit (configurable per plan). When exceeded you receive 429 with a Retry-After header. Errors are returned as JSON with both a machine code and human message.