Skip to content
isok.toAPI docsv1
Manage keys
Pro APIBase URL: https://isok.to

Build with Isokto links

Create short links from your server and read their click results. The public API is available to accounts whose current plan includes API access, currently Pro.

Use a bearer key created in your account settings.

Requests are scoped to your links and current plan.

Authentication

Open Settings → Plans & Billing → API keys to create a key. Copy it when shown; the full value is displayed once. You can keep up to five active keys and revoke them from the same panel.

Request header
Authorization: Bearer $ISOKTO_API_KEY

Use HTTPS. Store the key on your server, outside browser code, URLs, logs, and source control. If your Pro access ends, existing keys stop authorizing requests.

Quick start

Set ISOKTO_API_KEY in your server environment, then create a link:

Create a link · curl
curl -X POST https://isok.to/api/v1/links \
  -H "Authorization: Bearer $ISOKTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"originalUrl":"https://example.com/sale","title":"November sale"}'
201 Created · example response
{
  "link": {
    "id": "cmexample123",
    "shortCode": "aB12cD",
    "shortUrl": "https://isok.to/aB12cD",
    "originalUrl": "https://example.com/sale",
    "title": "November sale",
    "createdAt": "2026-11-08T08:30:00.000Z"
  }
}

Example IDs, codes, dates, and counts on this page are illustrative.

Endpoints

MethodPathPurpose
POST/api/v1/linksCreate a short link
GET/api/v1/linksList your newest links
GET/api/v1/links/{id}Read one link
GET/api/v1/links/{id}/resultsRead click results

POST /api/v1/links

Send JSON with originalUrl (required), title (optional, 1–200 characters), and customAlias (optional, 3–64 letters, digits, underscores, or hyphens). The URL must have a public HTTP(S) hostname and pass the destination safety check. Links use the standard Isokto host. Success returns 201 and a link object.

GET /api/v1/links

Returns { "links": [...] } with the newest 50 links owned by the key creator. Set limit to an integer from 1 to 100 to change the count. This version does not paginate older links.

List links · curl
curl -H "Authorization: Bearer $ISOKTO_API_KEY" \
  "https://isok.to/api/v1/links?limit=20"

GET /api/v1/links/{id}

Use the id returned when creating or listing a link. The response contains the short URL, destination, title, disabled state, and creation time. A link outside your account returns 404.

Click results

GET /api/v1/links/{id}/results returns total clicks, unique clicks, daily history, and country, device, and referrer breakdowns. Add days to choose a positive number of days within your plan’s analytics retention. The default is 30 days or your retention limit, whichever is smaller.

Read results · curl
curl -H "Authorization: Bearer $ISOKTO_API_KEY" \
  "https://isok.to/api/v1/links/cmexample123/results?days=7"
200 OK · example response
{
  "link": {
    "id": "cmexample123",
    "shortUrl": "https://isok.to/aB12cD"
  },
  "range": {
    "from": "2026-11-01T08:30:00.000Z",
    "to": "2026-11-08T08:30:00.000Z",
    "days": 7
  },
  "results": {
    "totalClicks": 124,
    "uniqueClicks": 98,
    "history": [{ "date": "2026-11-07", "count": 18 }],
    "countries": [{ "name": "TH", "count": 103 }],
    "devices": [{ "name": "mobile", "count": 89 }],
    "referrers": [{ "name": "direct", "count": 72 }]
  }
}

Analytics may arrive after the redirect. The history and breakdowns can lag recent clicks.

Limits and current scope

  • 60 API requests per key per UTC minute. A 429 response includes a Retry-After header.
  • Link creation counts toward your plan’s monthly link quota.
  • The API reads links owned by the user who created the key. It does not include another account’s links.
  • Version 1 creates links on the standard Isokto host. Editing, deletion, custom domains, and pagination beyond the newest 100 links are not available.

If a creation request times out after reaching the edge, a link may still have been created. Check your link list before retrying.

Errors

Errors return JSON with an error code. Handle the HTTP status first, then the code.

StatusExample codeWhat to do
400invalid_urlCheck the URL or input fields.
401invalid_api_keyCheck or replace the key.
403api_access_requires_proCheck current plan access.
404link_not_foundCheck the ID and key owner.
429rate_limit_exceededWait for Retry-After.
503safety_check_unavailableRetry later; no link is created.