Developers/Quickstart

Quickstart

Create your first short link with the TrimLink API in under 5 minutes.

Before you begin

Make sure you have:

Step 1: Create an API key

  1. Go to Dashboard → Settings → API & Integrations
  2. Click "Create API Key"
  3. Give your key a name (e.g., "Development") and select the scopes you need
  4. Copy your API key and store it securely

Important: Your API key will only be shown once. Store it in a secure location like an environment variable.

Step 2: Make your first API call

Use the following request to create a short link. Replace tk_live_your_api_key with your actual API key.

curl -X POST https://trimlink.co/api/v1/shorten \
  -H "Authorization: Bearer tk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/my-long-url"
  }'

Step 3: Check the response

A successful request returns your new short link:

Response
{
  "success": true,
  "data": {
    "id": "clx123abc",
    "shortCode": "abc123",
    "shortUrl": "https://trimlink.co/abc123",
    "destinationUrl": "https://example.com/my-long-url",
    "createdAt": "2026-01-31T12:00:00Z"
  }
}

Next steps