Docs
Everything the dashboard does, the API does. Create links, read analytics, manage domains and QR codes. 32 operations, and a key you can issue yourself.
Full API referenceSections
Base URL
https://trimly-api.fly.dev/api/v1Every path below is relative to it. Only HTTPS is served.
Authentication
Create a key in the dashboard under Settings → API and send it on every request:
curl https://trimly-api.fly.dev/api/v1/links \
-H "X-API-Key: trm_live_xxxxxxxxxxxx"A key belongs to one workspace and carries that workspace's permissions.
A key is shown once
The dashboard authenticates differently
Your first link
curl -X POST https://trimly-api.fly.dev/api/v1/links \
-H "X-API-Key: trm_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"destinationUrl": "https://example.com/a-long-url"}'Everything but destinationUrl is optional. Pass slug for a custom alias, domainId to serve it from one of your own domains, or password, expiresAt and clickLimit to restrict it.
Analytics
Every link tracks clicks from the moment it's created:
curl "https://trimly-api.fly.dev/api/v1/analytics/overview?linkId={id}&range=7d" \
-H "X-API-Key: trm_live_xxxxxxxxxxxx"{
"success": true,
"data": {
"summary": { "totalClicks": 146, "uniqueVisitors": 98 },
"timeseries": [
{ "bucket": "2026-08-19", "clicks": 12, "uniques": 9 },
{ "bucket": "2026-08-20", "clicks": 18, "uniques": 14 }
… one entry per day in range
]
… countries, cities, devices, browsers, heatmap
}
}Charted, timeseries is the same shape the dashboard renders:
linkId is optional — omit it for the workspace-wide overview. range accepts 24h, 7d, 30d, 90d, 12m or all. Unique visitors are counted with a daily-rotating hash, so the number is real without storing anyone's IP address.
Responses and errors
Every response has the same shape. Failures carry a code and a request id:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"requestId": "98a9b9dc-a27e-4672-8271-b6e33a65d448"
}
}Quote the request id when reporting a problem
Rate limits
Every response carries the current state of your limit:
RateLimit-Limit: 120
RateLimit-Remaining: 118
RateLimit-Reset: 42Exceeding it returns 429. Authentication endpoints are limited far more tightly than the rest.
Webhooks
Rather than polling, register a webhook and receive events as they happen: a link created, a domain verified, a member joining. Deliveries are retried and logged, and the log is kept for 30 days.
What you can call
- Links
- list, create, read, update, delete, bulk delete, export, import
- Analytics
- overview, top links, export
- QR codes
- list, create, download
- Domains
- list, add, verify
- Organization
- collections, tags
- Workspace
- members, activity
- Developer
- API keys, webhooks
- Billing
- plans, usage
Each one, with its parameters, request bodies and response schemas, is in the reference, which you can call directly from the page once you paste in a key. The OpenAPI document itself is at /openapi.json if you would rather generate a client.
Limits and support
Rate limits and quotas depend on your plan; the numbers are on the pricing page. Security issues go to the address on the security page.