REST APIv1.0

Build with TrimLink API

Programmatic access to link shortening. Create links, track clicks, and automate workflows with our REST API and webhooks.

Cached Redirects
Link lookups are cached in Redis for up to 24 hours
Secure
HTTPS only, API key authentication, signed webhooks
Custom Domains
Short links on your own domain, with HTTPS set up for you

Developer Features

Everything you need to integrate TrimLink into your workflow

Pro+

API Keys

Secure API key authentication with scoped permissions. Create, manage, and revoke keys from your dashboard.

Growth+

Webhooks

Real-time notifications when links are created, clicked, or updated. HMAC-SHA256 signed payloads.

Growth+

Zapier Integration

Connect TrimLink to thousands of apps. Automate link creation and react to click events without code.

Quick Start

1

Get your API key

Go to Dashboard → Settings → API & Integrations to create an API key.

tk_live_your_api_key_here
2

Add authentication header

Send your key in the X-API-Key header (Authorization: Bearer also works).

X-API-Key: tk_live_...
3

Make your first request

POST your destinationUrl to /api/v1/links.

POST /api/v1/links
4

Read the click report

GET /api/v1/stats/:code returns the link's 30 day click report.

GET /api/v1/stats/:code
Example Request
curl -X POST https://trimlink.co/api/v1/links \
  -H "Authorization: Bearer tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com"}'

Create Your First Link

Simple REST API with responses in JSON format

Request
curl -X POST https://trimlink.co/api/v1/links \
  -H "Authorization: Bearer tk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/my-long-url",
    "customCode": "my-link"
  }'
201Response
{
  "success": true,
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c1b-2a6d3f0b5c71",
    "shortCode": "my-link",
    "originalUrl": "https://example.com/my-long-url",
    "shortUrl": "https://trimlink.co/my-link",
    "createdAt": "2026-01-30T12:00:00.000Z"
  }
}

Rate Limits

Generous limits that scale with your needs

PlanAPI RequestsAPI KeysWebhooks
Pro1,000/day1—
Growth10,000/day53
TeamsUnlimitedUnlimited10
EnterpriseUnlimitedUnlimitedUnlimited

Ready to Get Started?

Check out the full API reference for detailed endpoint documentation, webhook events, and code examples.