For developers

URL shortener API, MCP server and browser extension

Create short links with the REST API straight from your code, give AI assistants access through our MCP server, or shorten any tab in one click with the extension for Chrome and Firefox. Free and ad-free; the full reference is below.

Create an API key

Free account required – it keeps spam out.

Create a short link via the API
curl https://mkasl.com/api/v1/links \
  -H "Authorization: Bearer mkasl_…" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://your-site.com/offer"}'
Response (abridged)
{
  "id": 4182,
  "short_code": "k7m2qx",
  "original_url": "https://your-site.com/offer",
  "short_domain": null
}

REST API with a key

The API lives at https://mkasl.com/api/v1 and expects a key in the “Authorization: Bearer” header. You create the key in the dashboard under Developers. It is shown only once and is stored on our side only as a checksum.

With the key you create, list, change and deactivate links, retrieve a link's statistics and export all links as CSV, JSON or a redirect file. Every new destination is checked for malicious sites before the link is created, just as in the dashboard.

  • Create, read, change and deactivate links
  • Statistics per link, from 24 hours to all time
  • Export as CSV, JSON or a redirect file

Limits per key

On the free plan each key can make 20 new links and 200 other requests per hour; with Pro it is 1,000 and 6,000. Beyond that the API answers with status 429 and tells you in the “Retry-After” header when you can carry on. Free allows one key, Pro up to ten.

So that keys cannot be misused for waves of spam, you need an account that is at least seven days old and has a confirmed email address.

A typical flow

When a product is published, a shop system creates a short link through the API and prints it as a QR code on the label. If the product is later delisted and the page is permanently unreachable, a webhook reports the dead link, and the system can use the API to point the destination at a replacement page.

MCP server for AI assistants

An MCP server runs at https://mkasl.com/api/v1/mcp and uses the same key. Assistants such as Claude can use it to create links, list your links, retrieve statistics and check short links before opening them. The limits are the same as for the REST API.

Webhooks and the extension

Webhooks report new links, links with a dead destination, destinations flagged as dangerous and hourly click counts to an address of your own, signed with an HMAC checksum. Free allows three webhooks, Pro 50.

The browser extension for Chrome and Firefox shortens the open tab, or a link via right-click, shows the statistics in its popup and uses your UTM templates.

Frequently asked questions

Is there an official SDK?
No. The API is lean JSON over HTTPS, and a call with curl or fetch is enough. The reference below shows every field.
Can I shorten links through the API anonymously?
No, every call needs a key from an account. We switched off anonymous shortening because of spam.
Do API links count towards the daily allowance?
Yes. Links from the API, MCP, the extension and the dashboard all count together towards your account's daily allowance.

Create a key and get going

Create a free account, make an API key and shorten your first link from code.

Create an API key

Free account required – it keeps spam out.

API reference

Use the API and the MCP server to create short links from your own programs or AI assistants. The technical documentation is in English.Manage API keys

Base URL: https://mkasl.com/api/v1

Authentication

Create an API key in your account settings (accounts older than 7 days with a verified email address). The key is shown once; store it safely. Send it as:

Authorization: Bearer mkasl_XXXXXXXXXXXXXXXXXXXXXXXXXX

Keys can be named and revoked at any time. A key has the same rights as your own account for links, but never admin rights, and can’t manage keys or import CSV files.

Rate limits

Per key and clock hour, depending on the plan of the key’s owner (pricing):

Bucket Free Pro
Creating links (POST /links, MCP create_link) 20 1000
Everything else 200 6000

Until the new Free limits start (announced by mail at least 14 days ahead), Free keys keep 60 and 600.

Over the limit: 429 {"error":"rate_limit_exceeded"} with a Retry-After header (seconds). New links per account and UTC day (all ways, also the web app): Free 330 (50 in the first 7 days), Pro 10000; over that 429 {"error":"quota_exceeded"}.

Method Path Description
GET /links?q=&tag=&sort=newest|oldest|clicks|title Your active links
POST /links Create: {"url", "slug"?, "title"?, "tags"?, "slug_style"?: "random"|"readable"|"words", "analytics_mode"?, "forward_query"?, "is_printed"?, "domain_id"?}. domain_id: one of your active custom domains (GET /domains); the link object then has short_domain
GET /links/{id} One link
PUT /links/{id} Update (same fields; "active": false deactivates, "domain_id": 0 back to the default domain)
DELETE /links/{id} Deactivate
GET /links/{id}/analytics?period=24h|7d|30d|90d|all Aggregated statistics
GET /links/export?format=csv|json|redirects Export all your links
GET /preview/{code} Public transparency data of any link (no key needed)

Every destination is checked against URLhaus and Spamhaus DBL. Only http and https destinations are accepted.

Errors: {"error": "code", "message": "..."}. Common codes: invalid_url, destination_blocked (422), invalid_tags, not_found, unauthorized, rate_limit_exceeded.

Example:

curl -X POST https://mkasl.com/api/v1/links \
  -H "Authorization: Bearer $MKASL_KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://example.org/article","tags":["blog"]}'

MCP server

MakeAShortLink speaks the Model Context Protocol (Streamable HTTP, JSON responses) at https://mkasl.com/api/v1/mcp, authenticated with your API key.

Tools: create_link, list_links, get_link_stats, preview_link.

Client configuration (example):

{
  "mcpServers": {
    "makeashortlink": {
      "type": "http",
      "url": "https://mkasl.com/api/v1/mcp",
      "headers": { "Authorization": "Bearer mkasl_..." }
    }
  }
}