Skip to main content

REST API

Put Cliqly inside your own systems

The Cliqly API creates, changes and deletes links; manages domains; and returns click statistics — all over HTTP and JSON. API access is included in every subscription, so you can run short links from a CRM, an internal panel, an automation flow or your own product without opening the dashboard.

Capabilities

What the API can do

Links and domains

Create links one at a time or in bulk, change where they point, set the slug, folder, tags, lifetime and targeting rules. Register domains, check their DNS status, and claim free subdomains.

Statistics

Pull time series by hour, day, week or month, plus breakdowns by country, city, device, OS, browser, referrer and UTM parameter — for one link, one domain, or the whole organisation.

Webhook

Receive link.created, domain.verified, quota.threshold, quota.exceeded and abuse.flagged notifications at your own endpoint, each with a verifiable signature.

Example

POST /links — create one link

Send the API key in the Authorization header with no Bearer prefix. originalURL is required and must be an absolute URL; leave path empty to get a random slug.

Request
curl -X POST https://cliqly.dev/api/v1/links \
  -H "Authorization: sk_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "go.tokoanda.co.id",
    "originalURL": "https://yourshop.com/august-sale",
    "path": "promo",
    "title": "August Sale",
    "tags": ["august", "instagram"]
  }'
Response
201 Created

{
  "originalURL": "https://yourshop.com/august-sale",
  "path": "promo",
  "idString": "lnk_7Kp2mQx9Ab",
  "shortURL": "https://go.tokoanda.co.id/promo",
  "secureShortURL": "https://go.tokoanda.co.id/promo",
  "createdAt": "2026-08-17T09:12:44.317Z",
  "DomainId": "dom_4f21",
  "OwnerId": "org_9c07",
  "success": true,
  "duplicate": false
}
List links — GET /links
curl "https://cliqly.dev/api/v1/links?limit=30&q=promo" \
  -H "Authorization: sk_live_xxxxxxxxxxxxxxxxxxxx"

{
  "links": [ /* … */ ],
  "count": 128,
  "nextPageToken": "eyJvIjoxMzB9"
}
Error — slug already taken
409 Conflict

{
  "error": "The slug /promo is already taken on go.yourshop.com. Choose another, or leave it empty for a random one.",
  "field": "path"
}

Every error says what is wrong and how to fix it, and names the offending field when the problem is the input. The common codes: 400 invalid input, 401 a wrong or revoked API key, 402 plan quota reached, 403 organisation suspended, 404 domain not registered, 409 slug clash or unverified domain.

Migrating is usually just the base URL

Request and response shapes follow the common shortener convention

The field names, the inconsistent capitalisation and the Authorization header without Bearer are all kept exactly as they are, for compatibility. For creating and reading links, an SDK or automation step you already have usually just needs pointing at https://cliqly.dev/api/v1 with a Cliqly API key.

We call it shape-compatible, not identical. Always run your integration against a test environment first.

Authentication and scopes

One key, one set of permissions

  • links:read — read the link list and link details
  • links:write — create, change and delete links
  • domains:read — read domains and their DNS status
  • domains:write — add and change domains
  • stats:read — read click statistics

A key can be revoked from the dashboard at any time, and revocation takes effect immediately. Each key records when it was last used.

Documentation

The full reference

This page is a summary. The full endpoint list, the parameters, the error codes, the rate limits and the webhook formats are in the documentation.

Who can use the API?

Every subscriber. API access is included in Hobby, Pro, Team and Enterprise — not sold separately, and with no per-request surcharge. The Free plan does not issue API keys; if you need the API, the cheapest paid plan is enough. See pricing page.

How do I get an API key?

From the dashboard, under Settings → API. Each key gets its own name and scopes, and its value is shown only once, when it is created. Send the key in the Authorization header with no Bearer prefix — the shape other shorteners use, kept deliberately.

How much code changes if I move from another service?

For creating links, usually just the base URL and the API key. The field names on both request and response follow the convention the widely used shorteners set — including originalURL, idString, shortURL, DomainId and OwnerId with their capitalisation exactly as-is.

We do not promise full compatibility across another service’s entire API surface. Endpoints beyond links and domains have shapes of their own; check the documentation before moving a complicated integration.

What happens when a plan quota is passed?

A request to create a link is answered with 402 quota_exceeded, while existing links keep serving traffic. For a bulk request the whole batch is refused — never half-applied. If the organisation is suspended, every endpoint that changes data answers 403 org_suspended and redirects answer 410 Gone.