API Docs
v1.0
Quickstart
Create your first short link with the TrimLink API in under 5 minutes.
Before you begin
Make sure you have:
- A TrimLink account on the Growth plan or higher
- Access to a terminal or HTTP client
Step 1: Create an API key
- Go to Dashboard → Settings → API & Integrations
- Click "Create API Key"
- Give your key a name (e.g., "Development") and select the scopes you need
- 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"
}
}