Developer API
Create smart links from your own application
Use a secure API key to shorten links from your CRM, automation workflow, internal dashboard, or SaaS product.
Create an authenticated link
POST /api/linksconst response = await fetch("https://your-api-domain.com/api/links", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "sk_live_xxxxx"
},
body: JSON.stringify({
originalUrl: "https://example.com/product-launch",
customAlias: "launch",
startsAt: "2026-12-01T09:00:00.000Z",
expiresAt: "2026-12-31T23:59:59.000Z",
maxClicks: 500,
tags: ["marketing", "launch"],
folder: "Product Launches",
notes: "Shared in the December announcement"
})
});
const result = await response.json();
console.log(result.data.shortUrl);Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
| originalUrl | string | Required | HTTP or HTTPS destination URL. |
| customAlias | string | Optional | 3-30 letters, numbers, or hyphens. |
| password | string | Optional | Protect the redirect with a password of at least 4 characters. |
| startsAt | ISO datetime | Optional | Keep the link unavailable until this date and time. |
| expiresAt | ISO datetime | Optional | Disable the link after this date and time. |
| maxClicks | positive integer | Optional | Disable the link after this number of visits. |
| campaignId | MongoDB ID | Optional | Attach the link to one of your campaigns. |
| domainId | MongoDB ID | Optional | Use one of your verified custom domains. |
| tags | string[] | Optional | Add up to 10 searchable tags. Each tag can contain letters, numbers, underscores, or hyphens. |
| folder | string or null | Optional | Group the link in a dashboard folder. Maximum 50 characters. |
| notes | string or null | Optional | Store a private dashboard note. Maximum 500 characters. |
Success response
HTTP 201{
"success": true,
"message": "Short link created successfully",
"data": {
"shortCode": "launch",
"shortUrl": "https://your-api-domain.com/launch",
"originalUrl": "https://example.com/product-launch",
"clicks": 0,
"maxClicks": 500,
"startsAt": "2026-12-01T09:00:00.000Z",
"tags": ["marketing", "launch"],
"folder": "Product Launches",
"notes": "Shared in the December announcement",
"expiresAt": "2026-12-31T23:59:59.000Z"
}
}Guest short links
POST /api/links/guestFor a no-login integration, create a temporary guest link. Guest links support aliases, passwords, and an optional earlier expiration date. They expire and delete automatically within 7 days.
curl -X POST "https://your-api-domain.com/api/links/guest" \
-H "Content-Type: application/json" \
-d '{
"originalUrl": "https://example.com/article",
"customAlias": "read-this"
}'Bulk dashboard import
POST /api/links/bulkImport up to 100 links at a time from the dashboard CSV tool or another browser workflow. This endpoint uses your signed-in dashboard session rather than an API key. Each item supports aliases, activation and expiration dates, click limits, tags, folders, and private notes.
const response = await fetch("https://your-api-domain.com/api/links/bulk", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
credentials: "include",
body: JSON.stringify({
links: [
{
originalUrl: "https://example.com/launch",
customAlias: "launch",
tags: ["marketing"],
folder: "Product Launches"
},
{
originalUrl: "https://example.com/docs",
notes: "Imported from the dashboard CSV tool"
}
]
})
});
const result = await response.json();
console.log(result.data.created, result.data.errors);Common responses
201 Link created successfully
400 Invalid request payload
401 Missing, invalid, inactive, or expired API key
403 Plan or IP address does not allow access
409 Alias is already in use
429 Rate limit exceeded
