Getting started
- The API is part of the Pro and Business plans.
- Open Dashboard → Settings → API keys, create a key and copy it — it is shown only once.
- Send it with every request. Your first call:
curl https://toolszu.com/biolink/api/v1/me \
-H "Authorization: Bearer tzb_YOUR_KEY" Every answer is JSON (UTF-8). Times are UTC in ISO 8601 (2026-12-31T23:59:00Z); click days are counted in India time (Asia/Kolkata), as in your dashboard.
Authentication
Send your key in the Authorization header as a bearer token. If your platform removes that header, use X-API-Key: tzb_… instead. Keys in the address (?key=) are not accepted, so they never end up in logs.
- Read and write keys can do everything. Read only keys can only use
GET. - Up to 5 active keys per account. Revoke a key any time — it stops at once. We email you whenever a key is created.
- Requests must use HTTPS. Plain HTTP is refused.
Limits
| Plan | Calls a minute | Calls a day |
|---|---|---|
| Pro | 60 | 5,000 |
| Business | 120 | 20,000 |
Limits count all keys of an account together. Each answer has X-RateLimit-Limit and X-RateLimit-Remaining (per minute). Over the limit you get 429 with a Retry-After header (seconds). Creating links also follows your plan’s short-link limit. Request bodies can be up to 16 KB.
Errors
Errors use HTTP status codes and the same JSON shape. field is added when one input is wrong.
{
"error": {
"code": "validation_failed",
"message": "This name is already taken on this domain.",
"field": "slug"
}
} | 400 | invalid_json | The body is not a JSON object. |
| 401 | unauthorized | Missing, wrong or revoked key. |
| 403 | plan_required · read_only_key · account_unavailable · https_required · not_allowed | Not allowed for this key, plan, account or link. |
| 404 | not_found | No such address, or the link isn’t in your account. |
| 405 | method_not_allowed | Wrong method for this address. |
| 409 | not_allowed | A flagged or removed link can’t be paused or resumed. |
| 413 · 415 | payload_too_large · unsupported_media_type | Body over 16 KB, or not sent as application/json. |
| 422 | validation_failed | An input is wrong — see message and field. |
| 429 | rate_limited · too_many_failed_attempts | Too many calls (or too many wrong keys from your IP). Wait for Retry-After. |
| 500 | server_error | Our side. Try again; if it repeats, contact support. |
Account
/meYour plan, short-link and call limits, and which key you used.
/domainsDomains you can make short links on (default: true is used when you don’t pick one).
{ "data": [ { "domain": "myzu.link", "default": true } ] }
Short links
/linksYour links, newest first. Query: page (1…), per_page (1–100, default 25), q (search name, title or address), status (active, paused, flagged, banned, expired), domain, sort (newest, clicks, name).
curl "https://toolszu.com/biolink/api/v1/links?per_page=10&sort=clicks" \
-H "Authorization: Bearer tzb_YOUR_KEY" A link looks like this:
{
"id": 482,
"short_url": "https://myzu.link/summer-sale",
"domain": "myzu.link",
"slug": "summer-sale",
"url": "https://example.com/products?utm_source=instagram",
"title": "Summer sale",
"ios_url": null,
"android_url": null,
"expires_at": "2026-12-31T18:29:00Z",
"expired_url": "https://example.com/sale-ended",
"splash": { "enabled": false, "timer": 5, "message": "" },
"status": "active",
"clicks": 1204,
"last_click_at": "2026-11-19T10:12:44Z",
"created_at": "2026-11-01T08:00:00Z",
"updated_at": "2026-11-18T12:30:00Z"
} Lists answer { "data": [ …links ], "meta": { "page", "per_page", "total", "pages" } }; one link answers { "data": { …link } }.
/links/{id}One link.
/links/check?slug=summer-sale&domain=myzu.linkIs a name free? Answers { "available": true, "slug": "summer-sale", "domain": "myzu.link", "message": "Available" }.
/links/{id}/pausewrite keyStop a link for now (visitors see “link paused”). /resume starts it again.
/links/{id}write keyDelete a link and its clicks for good. Answers { "deleted": true, "id": 482 }.
Create a link
/linkswrite keySend JSON. Only url is required; an empty slug gets a random 6-character name. Answers 201 with the new link.
| Field | Type | What it does |
|---|---|---|
| url | string, required | The address the short link opens (http or https). Links from other shorteners are expanded first; unsafe sites are refused. |
| domain | string | One of /domains. Default: the default domain. |
| slug | string | The name after the domain: letters, digits, - and _. Empty = random. |
| title | string ≤ 120 | Your own label, shown in your dashboard. |
| ios_url · android_url | string | Different address for iPhone / Android visitors (e.g. app stores). |
| expires_at | ISO 8601 or null | When the link stops (e.g. 2026-12-31T23:59:00Z). null removes it. |
| expired_url | string | Where visitors go after expires_at. |
| splash | object | { "enabled": bool, "timer": 0|3|5|10, "message": "≤ 200" }. Turning it off needs a plan that allows it. |
curl
curl -X POST https://toolszu.com/biolink/api/v1/links \
-H "Authorization: Bearer tzb_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/products", "slug": "summer-sale", "title": "Summer sale"}' PHP
<?php
$ch = curl_init('https://toolszu.com/biolink/api/v1/links');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TOOLSZU_API_KEY'), // keep the key out of your code
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['url' => 'https://example.com/products', 'slug' => 'summer-sale']),
]);
$res = json_decode(curl_exec($ch), true);
echo $res['data']['short_url'] ?? $res['error']['message']; JavaScript (Node.js 18+)
const res = await fetch("https://toolszu.com/biolink/api/v1/links", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TOOLSZU_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com/products", slug: "summer-sale" }),
});
const json = await res.json();
console.log(res.ok ? json.data.short_url : json.error.message);
Update a link
/links/{id}write keySend only the fields to change — the same fields as Create. Changing url checks the new address again.
curl -X PATCH https://toolszu.com/biolink/api/v1/links/482 \
-H "Authorization: Bearer tzb_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Winter sale", "expires_at": null}'
Click stats
/links/{id}/statsClicks of one link.
/statsClicks of all your links together.
Query: from and to (dates like 2026-11-01; default the last 30 days, never older than your plan’s analytics history) and any filter: country (US, IN …), region, city, continent, device, os, browser, lang, source, campaign.
{
"link_id": 482,
"from": "2026-11-01", "to": "2026-11-19", "oldest_available": "2025-11-20", "timezone": "Asia/Kolkata",
"totals": { "clicks": 1204, "unique": 980, "qr": 85, "previous_period": 870 },
"days": [ { "day": "2026-11-01", "clicks": 42, "unique": 37 } ],
"breakdown": {
"country": [ { "value": "US", "clicks": 410 } ],
"device": [ { "value": "mobile", "clicks": 902 } ],
"source": [ { "value": "instagram", "clicks": 512 } ]
}
} Bots are not counted. We never store visitors’ IP addresses.
Security
- Keep keys secret. Put them on your server or in your app’s secure storage (environment variables, secret managers) — never in web pages, front-end JavaScript or public repositories. The API sends no CORS headers, so other websites can’t call it from a visitor’s browser.
- One key per app. If one leaks, revoke just that one in your dashboard; the others keep working.
- Least access. Use a read-only key for apps that only show links or stats.
- We store only a one-way fingerprint of each key, so nobody — not even us — can read it back. Every call is logged for 30 days with the time, address and a shortened IP, and you can see each key’s last use in your dashboard.
- Links made through the API pass the same safety checks as the dashboard. Abuse of the API (spam, phishing, malware) ends the account.
- Found a security problem? Email [email protected] with “Security” in the subject.
Version 1 · We add fields without notice (ignore ones you don’t know); anything that breaks existing apps goes into a new version.
