Short links, straight
from your code.
Create and manage links from your app, store or backend with a simple REST API. Every link works the moment the request returns.
# Create a short link curl https://api.clkr.in/v1/links \ -H "Authorization: Bearer $CLKR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://acme.com/collections/spring-sale", "domain": "go.acme.com", "slug": "spring", "tags": ["campaign", "email"] }'
const res = await fetch("https://api.clkr.in/v1/links", { method: "POST", headers: { Authorization: `Bearer ${process.env.CLKR_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://acme.com/collections/spring-sale", domain: "go.acme.com", slug: "spring", tags: ["campaign", "email"], }), });
import os, requests res = requests.post( "https://api.clkr.in/v1/links", headers={"Authorization": f"Bearer {os.environ['CLKR_API_KEY']}"}, json={ "url": "https://acme.com/collections/spring-sale", "domain": "go.acme.com", "slug": "spring", "tags": ["campaign", "email"], }, ) link = res.json()
{
"id": "lnk_3fK9aQ2mZx7bT1cR4pL8",
"shortUrl": "https://go.acme.com/spring",
"url": "https://acme.com/collections/spring-sale",
"redirectType": 302,
"tags": ["campaign", "email"],
"createdAt": "2026-03-12T09:30:00.000Z"
}A small API that does the job.
Authenticate with a workspace API key in the Authorization header. Send and receive JSON.
Targeting, expiry and tags included.
Everything you can set in the dashboard, you can set in the API. Send phones to the right app store, give each country its own page and set an end date, all in the same call that creates the link.
- Device destinations for iPhone/iPad and Android
- Country destinations by two-letter code
- 302 by default, or 301 when you ask for it
const res = await fetch("https://api.clkr.in/v1/links", { method: "POST", headers: { Authorization: `Bearer ${process.env.CLKR_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://acme.com/app", iosUrl: "https://apps.apple.com/app/acme", androidUrl: "https://play.google.com/store/apps/details?id=com.acme", geo: { DE: "https://acme.com/de" }, expiresAt: "2026-12-31T23:59:59Z", }), }); const link = await res.json();
Errors that tell you what to fix.
Every error has a stable code and a readable message. Validation errors list each field that failed, so your logs say exactly what went wrong.
// 422 Unprocessable Content { "error": { "code": "invalid_request", "message": "Request body is invalid", "issues": [ { "path": "url", "message": "Only http and https URLs are allowed" } ] } }
The details, done properly.
Workspace API keys
Create a key per integration, see when each was last used and revoke it in one click.
Plain JSON over HTTPS
No SDK required. Any language or tool that can make an HTTP request works.
Everything the dashboard can do
Slugs, domains, tags, expiry, 301 or 302 and device and country targeting, all in one request.
Live straight away
Links work the moment the API responds. There's no publish step and no queue.
Clear errors
Validation errors tell you which field failed and why, so you can fix requests fast.
Cursor pagination
Page through thousands of links reliably, up to 100 at a time.
What teams build with it.
Transactional messages
Put a short, trackable link in every order confirmation, delivery update or receipt.
Personalised campaigns
Generate a link per recipient or per segment and see who actually clicked.
Your CMS or store
Create a short link and QR code automatically whenever a product or post is published.
Internal tools
Let support, sales or ops teams make links from the tools they already use.
Questions about the API
How do I get an API key?
Create one in your workspace settings. Keys start with clkr_ and are shown once, so store yours somewhere safe. We only keep a hash of it.
Is there an SDK?
You don't need one. The API is plain JSON over HTTPS, so fetch, curl, requests or any HTTP client works.
Can I change a link's slug through the API?
No. The slug and domain are the link's address and are fixed once it's created. Everything else, including the destination, can be changed with PATCH.
Do links created through the API show up in the dashboard?
Yes. The API and the dashboard share the same workspace, so links, tags and analytics appear in both.