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/links
const 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

FieldTypeRequiredDescription
originalUrlstringRequiredHTTP or HTTPS destination URL.
customAliasstringOptional3-30 letters, numbers, or hyphens.
passwordstringOptionalProtect the redirect with a password of at least 4 characters.
startsAtISO datetimeOptionalKeep the link unavailable until this date and time.
expiresAtISO datetimeOptionalDisable the link after this date and time.
maxClickspositive integerOptionalDisable the link after this number of visits.
campaignIdMongoDB IDOptionalAttach the link to one of your campaigns.
domainIdMongoDB IDOptionalUse one of your verified custom domains.
tagsstring[]OptionalAdd up to 10 searchable tags. Each tag can contain letters, numbers, underscores, or hyphens.
folderstring or nullOptionalGroup the link in a dashboard folder. Maximum 50 characters.
notesstring or nullOptionalStore 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/guest

For 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/bulk

Import 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