On this page
Getting started
SendURL API
Create and manage short links, and read their clicks, from your own code. The API is REST, speaks JSON and authenticates with an API key from your console.
- Base URL
- https://api.sendurl.to/api/v1
- Format
- JSON in, JSON out, over HTTPS
- Available on
- Every plan, Free included
Getting started
Workspaces, folders and links
Everything you create belongs to a workspace. Every account has one, made at signup with a folder called Default. A workspace holds folders, and every link belongs to exactly one folder (how the console uses them: folders and tags). The API calls these org (as in orgId) and folder.
- Your API key decides the workspace. URLs never name it, and nothing outside the key's workspace is visible: another workspace's link is a 404.
- A link created without
folderIdgoes into the Default folder (or a folder-level key's own folder).PATCH /links/:idwithfolderIdmoves it. - A workspace can have as many folders as its plan allows: 3 on Free, 5 on Starter, 25 on Pro, 100 on Growth and no limit on Enterprise, the Default folder included. Folders can be created through the API and renamed in the console; they can't be deleted.
- Folders used to be called projects. The old names still work, with the same meaning:
/projectsfor/folders,projectIdforfolderId, andprojectId,projectandprojectssit next to the new names in every response. They are deprecated: use the new ones. A request withfolderIdandprojectIdthat differ is 400validation_error. Error codes keep their names (project_not_foundand the rest), and so does the CSV export'sprojectcolumn.
Plan limits
The link limit belongs to the workspace and counts its links across all folders. Creating one more is a 403 link_limit_reached. GET /me and GET /links report the plan and usage. What a key can do on each plan, in one table: URL shortener API.
| Plan | Links per workspace |
|---|---|
| Free | 25 in total |
| Starter | 250 a month |
| Pro | 2,000 a month |
| Growth | 5,000 a month |
| Enterprise | 25,000 a month |
Authentication
Authenticate with an API key
Every request needs an API key, sent as a Bearer token in the Authorization header. Without a valid key the API answers 401.
- Create a keyOpen API keys in the console and choose Create key. Give it a name like “Production”.
- Choose its access, expiry and permissionsWhole workspace or one folder (below). Expiry: never, 30 days, 90 days or a year. Permissions: Full access, or only the scopes you pick. Keys look like
snu_followed by 32 letters and digits; copy yours from the API keys page. - Send it on every requestAs
Authorization: Bearer snu_…, overhttps://only. Store it in an environment variable such asSENDURL_API_KEY.
Keep keys secret. Call the API from your server, never from a browser or mobile app: anyone who can read the key can use it. If a key leaks, revoke it on the API keys page and create a new one.
Header
Authorization: Bearer $SENDURL_API_KEY{
"error": "invalid_api_key",
"message": "This API key was revoked"
}Workspace keys and folder-level keys
| Endpoint | Workspace key | Folder-level key |
|---|---|---|
| Links: create, list, read, update, delete | Every folder. May pass folderId. | Its folder only. Another folderId is 403 project_forbidden on writes, 404 project_not_found on GET /links. |
| Clicks and daily stats | Every link of the workspace. | Links of its folder. Others are 404. |
Export links (GET /links/export.csv) | Every folder. May pass folderId. | Its folder only. |
Analytics (/analytics/overview, /breakdown, /clicks) | The whole workspace without folderId, or one folder or link. | Its folder only. Another folderId is 404 project_not_found, a link outside it 404 link_not_found. |
GET /domains, GET /domains/:id | Yes. | Yes: the workspace's domains. |
GET / POST /folders | Yes. | No: 403 project_key_forbidden. |
GET /me | Yes. | Yes, with its folder. |
- A key can't create, list or revoke keys. API keys, listing your workspaces (
GET /orgs), renaming folders or the workspace, adding, verifying or removing domains, your profile and dashboard reports live in the console only; called with a key, those endpoints answer 403session_required. - A revoked key fails from its next request, and an expired key from its expiry: 401
invalid_api_key, withmessage“Invalid API key”, “This API key was revoked” or “This API key has expired”. - A workspace can have 25 active keys at a time.
- Links a key creates are recorded as created by the person who made the key (
userId).
Key permissions (scopes)
A key has Full access by default: every endpoint below that an API key can call. To limit what a key can do, choose Custom when you create it and tick the permissions it needs. Each endpoint names the one it needs under Permission (scope). A key's permissions can't be changed later: create a new key and revoke the old one.
| Scope | Allows |
|---|---|
links:read | List and retrieve links, their daily clicks and clicks, and export links as CSV. |
links:write | Create links, update them and pick an A/B test's winner. |
links:delete | Delete links (on a paid plan). |
analytics:read | The analytics endpoints: overview, breakdown and clicks across links. |
workspace:read | GET /me, list folders, list tags, list and retrieve domains. |
folders:write | Create folders. |
A key without the permission an endpoint needs gets 403 with insufficient_scope, and requiredScope names the permission. Its access (workspace or folder) still applies on top: a folder-level key with links:read reads its own folder's links only.
{
"error": "insufficient_scope",
"message": "This API key doesn't have the analytics:read scope.",
"requiredScope": "analytics:read"
}Getting started
Official SDKs for Node.js and Python
The official SDKs call the endpoints on this page for you: typed requests and responses, lists that page themselves, one error class per status with the API's code, and retries for reads only (writes are never retried). Response keys stay camelCase, as below; Python arguments are snake_case. Save the Node.js sample as an .mjs file, an ES module, so its top-level await runs.
- Node.js and TypeScriptnpm install sendurlNode.js 18 or later, Deno, Bun and edge runtimes such as Cloudflare Workers. No dependencies.sendurl on npmsendurl-to/sendurl-node
- Pythonpip install sendurlPython 3.9 or later, with a sync client and an async one (AsyncSendURL). Depends on httpx only.sendurl on PyPIsendurl-to/sendurl-python
A walk-through of both, from the first link to analytics, errors and edge runtimes, is the URL shortener SDK for Node.js and Python.
// index.mjs (an ES module, so top-level await works)
import { SendURL } from "sendurl";
// The key is read from SENDURL_API_KEY
const sendurl = new SendURL();
const link = await sendurl.links.create({
destinationUrl: "https://example.com/spring",
});
console.log(link.shortUrl); // a random slug on snu.to
for await (const item of sendurl.links.list()) {
console.log(item.slug, item.totalClicks);
}Getting started
MCP server for AI assistants
The SendURL MCP server lets AI assistants such as Claude, ChatGPT, Claude Code, Cursor and VS Code create and manage links and read clicks through the Model Context Protocol. Each tool calls one of the endpoints on this page, so the same plan limits, folder scope and error codes apply.
- Endpoint
- https://api.sendurl.to/mcp
- Transport
- Streamable HTTP, stateless
- Available on
- Every plan, Free included
- Sign-in
- OAuth 2.1 with PKCE, or an API key
Sign in (OAuth)
- claude.ai, ChatGPT, Claude Code, Codex, Cursor and VS Code open a SendURL page, where a workspace owner or admin picks the workspace, chooses the permissions (any can be unticked, at least one must stay) and approves.
- The page shows where the app connects from and where it sends the browser back, with a Verified label for an app SendURL has checked. An app that registered itself is marked Unverified, and one named like a well-known brand but not hosted by that brand gets a red warning; Cursor's own app shows both, as expected, since it registers itself.
- The app then appears under Connected apps on the console's API keys page. Open it there and choose Disconnect: its next call answers
401. - An access token lasts 1 hour and the client renews it by itself; a connection left unused for 30 days has to sign in again.
- claude.ai, ChatGPT and Claude Code identify themselves with a client ID metadata document; other clients register themselves (dynamic client registration). The sign-in must return to an
httpsorlocalhostaddress (Cursor's fixed redirects are both); a client that returns to a custom app-link scheme uses an API key instead.
Or an API key
- Or send an API key:
Authorization: Bearer snu_…, as for the REST API. Claude Code, Codex, Cursor, VS Code and scripts can send one; ChatGPT only signs in, and on claude.ai sign in too (a key in its connector's request headers is stored with Claude and, on Claude Team and Enterprise, shared by every member). Use a key with only the permissions the assistant needs, keep it in an environment variable, never in a file you share or commit; a folder-level key reaches only its folder. - A console session token is refused at the MCP endpoint, and so is a request from a web page (a browser
Origin).
Step-by-step set-up for each client is in the MCP server setup guide; client configurations and issues are on GitHub at sendurl-to/sendurl-mcp.
claude mcp add --transport http sendurl https://api.sendurl.to/mcp
claude mcp login sendurlClaude Code with a key: run it with the default scope or --scope user, never with --scope project: your shell fills in the key, and project scope writes it into the repository's .mcp.json, where the next commit shares it. To share a key-based connection, commit a .mcp.json that names ${SENDURL_API_KEY} instead (setup guide).
Tools and the permission each needs
| Tool | What it does | Permission |
|---|---|---|
| get_account | Your workspace, plan, limits and usageRead-only | workspace:read |
| list_links | Find links by search text, folder, tag or status; newest or most-clicked first, 10 at a timeRead-only | links:read |
| get_link | One link: destination, status, tags, click total and QR scansRead-only | links:read |
| create_link | Create a short link: custom back-half, title, folder and tags; expiry or a password on Pro and aboveCreates | links:write |
| update_link | Change a link: title, tags, folder, on or off; its destination, expiry or password on Pro and aboveDestructive: marked so the client can ask you to confirm first (most do by default) | links:write |
| delete_link | Delete a link for good (paid plans; Free switches links off instead)Destructive: marked so the client can ask you to confirm first (most do by default) | links:delete |
| pick_ab_test_winner | End a link's A/B test: the winning variant becomes its destinationDestructive: marked so the client can ask you to confirm first (most do by default) | links:write |
| get_link_stats | A link's all-time clicks per dayRead-only | links:read |
| list_link_clicks | A link's clicks one by one, newest first: country, device, browser and referring siteRead-only | links:read |
| get_analytics_overview | Clicks for a period: totals, a daily series, the period before, top links, top tags and social sourcesRead-only | analytics:read |
| get_analytics_breakdown | Clicks ranked by link, country, device, browser, OS, referrer or A/B variant; by city or UTM on Pro and aboveRead-only | analytics:read |
| list_analytics_clicks | Clicks one by one for a period, across the workspace, a folder or one linkRead-only | analytics:read |
| list_folders | Your folders, Default first (workspace keys and apps only)Read-only | workspace:read |
| create_folder | Create a folder (workspace keys and apps only)Creates | folders:write |
| list_tags | Your tags, to tag or filter linksRead-only | workspace:read |
| list_domains | Your snu.to subdomains and custom domains, with their statusRead-only | workspace:read |
| get_domain | One domain, with its status and DNS set-upRead-only | workspace:read |
An API key or a connected app has every permission, or the ones you chose: the same six as key permissions, chosen on the consent page for a connected app. The tool list an assistant sees holds only the tools its permissions allow. A call outside them fails: with an API key, as a tool error (isError) with the code insufficient_scope and requiredScope; with a sign-in, as HTTP 403 with WWW-Authenticate: Bearer error="insufficient_scope", so the client can ask you for the missing permission.
Results, errors and limits
- 60 tool calls a minute for each key or connected app. Past that a call answers
429withRetry-After. - Analytics tools run one at a time for each key or app: a second call while one runs answers
analytics_busy, and a busy moment answersanalytics_unavailablewith a retry time. - A tool's result is the endpoint's JSON, as structured content, and as text after a one-line summary. The
list_*tools come 10 at a time with a cursor for the next page;get_analytics_breakdownreturns up to 50 rows, with no cursor. list_link_clicksgives each click's time, country, city, device, browser, OS, source and variant, and the referring site's host only: never the user agent or the full referrer URL.get_link_statsgives{ days: [{ date, count }] }.- An endpoint's error becomes a tool error with the same code and message, such as
plan_upgrade_required(with the plan that unlocks the feature) orlink_limit_reached. - A tool call stops after 15 seconds. The Cloudflare limit of the API (below) applies to the MCP endpoint too.
- No tool returns a link's password, an API key or a click's IP address; on Free a click's city is withheld, as in the API.
Links
Create a link
POST/api/
Shortens a URL and returns the new link. Leave out slug and SendURL picks a random five-character one.
The link counts against the workspace's link limit, whichever folder it lands in.
AccessAny API key. A folder-level key creates links in its own folder.
Permission (scope)links:write
Body parameters
- destinationUrlstringRequired
- The absolute URL visitors are sent to, e.g.
https://example.com/page. Up to 32,768 characters; longer is 400 ondestinationUrl. - iosUrlstring | nullOptional
- Where iPhone and iPad visitors go instead of
destinationUrl: anhttp://orhttps://URL (your App Store page, a universal link) or an app link (myapp://path,itms-apps://…). Pro and above (below it, 403plan_upgrade_requiredwithfeature: "mobile_target"). Printable ASCII only (percent-encode anything else; an international domain in itsxn--form), up to 2048 characters, and no user name or password in a web address.javascript:,data:,vbscript:,file:,blob:anditms-services:are refused. Empty,nullor left out: visitors get the destination. Bots, and tablets that show desktop websites (Safari's default on iPad), always get the destination. An app link only works when the app is installed. - androidUrlstring | nullOptional
- Where Android visitors go instead of
destinationUrl: anhttp://orhttps://URL (your Google Play page, an App Link) or an app link (myapp://path,market://…,intent://…). Same rules asiosUrl. - tagIdsuuid[] | nullOptional
- Tags of the workspace to put on the link (
GET /tags), up to 10. A tag of another workspace is 400 ontagIds. - qrStyleobject | nullOptional
- The QR code's design:
{ v: 2, fg: "#rrggbb", bg: "#rrggbb", dots, corners, cornerColor, gradient, logo, frame }, every key present (nullfor none; av: 1object with only the first five keys is still accepted).dots:square,rounded,dots,classy,classy-rounded,extra-rounded,diamond,starorvertical.corners:square,rounded,dots,extra-rounded,leaf,leaf-inverse,circle-square,square-circleorsharp.cornerColor:"#rrggbb"ornull.gradient:{ type: "linear" | "radial", from, to, angle }(angle 0-359) ornull.logo:{ kind: "icon", id }(sendurl,facebook,instagram,x,youtube,linkedin,tiktok),{ kind: "text", text }(1-10 characters) ornull.frame:{ id, text, color }(plain,caption,handwritten,caption-bar-bottom,caption-bar-top,caption-bold,handwritten-bold,caption-top-bottom,pill,follow; text 1-20 characters; color"#rrggbb"ornull) ornull. The code must stay dark on light with a contrast of at least 4:1, every gradient stop and the corner colour included (else 400 onqrStyle).null: the plain code. Every plan may use the square, rounded and dots patterns, the square and rounded corners, the 8 colour presets and theplain,captionandhandwrittenframes in their default colour. Every other pattern, corner style, colour and frame is Starter and above (else 403plan_upgrade_required,feature: "qr_style"); alogo, agradientand acornerColorare Pro and above (feature: "qr_brand"). A link keeps a paid part it already has while it stays unchanged, and may drop it. The encoded URL is alwaysqrUrl. - previewobject | nullOptional
- The link's custom preview: the title, description and image that WhatsApp, X, LinkedIn, Facebook, Slack and other apps show when the short URL is shared.
{ title, description?, image? }:title1–120 characters (required),descriptionup to 300,imageanhttps://URL of up to 2048 characters. Line breaks and control characters become spaces. A bad field is 400 onpreview.title,preview.descriptionorpreview.image. Left out ornull: no custom preview (apps show the destination's own). Custom previews are Pro and above, with a number of new previews a month by plan (250 on Pro, 1,000 on Growth, unlimited on Enterprise): below Pro, 403plan_upgrade_requiredwithfeature: "link_preview"; past the month's number, 403preview_limit_reachedwithlimit,current,periodandresetsAt. - abTestobject | nullOptional
- An A/B test:
{ variants: [{ id, url, weight }, …] }with 2–4 variants.idisa,b,cord(each once; keep a variant's id when you edit the test, so its visitors stay on it),urlanhttp://orhttps://address of up to 2048 characters,weighta whole percentage from 1 to 99, and the weights add up to 100. People are split between the variants by weight and keep their variant for 30 days; iPhone and Android visitors with an app link get the app link, and bots getdestinationUrl. A bad field is 400 onabTest.variants,abTest.variants.<i>.url,abTest.variants.<i>.weightorabTest.variants.<i>.id. Left out ornull: no test. A/B tests are Pro and above, up to 4 variants; below Pro a new test is 403plan_upgrade_requiredwithfeature: "ab_test"(limitType: "tests", or"variants"past 4). - geoTargetsobject | nullOptional
- Country rules:
{ rules: [{ id?, countries, url }, …] }with 1–10 rules.countriesare two-letter ISO 3166-1 codes (any case; stored upper-case and sorted), each country in one rule only;urlanhttp://orhttps://address of up to 2048 characters. Visitors from a rule's countries go to itsurl; everyone else, visitors whose country is unknown and bots getdestinationUrl, and iPhone and Android visitors with an app link get the app link. A visitor a rule sends is not split by an A/B test. Each rule gets anidthat stays with it: send the ids back when you edit the rules, so each rule keeps its clicks. A bad field is 400 ongeoTargetsor its field (geoTargets.rules.<i>.countries.<j>,geoTargets.rules.<i>.url). Left out ornull: no rules. Pro and above: setting or changing rules on a lower plan is 403plan_upgrade_requiredwithfeature: "geo_targeting"andrequiredPlan: "premium". - slugstringOptional
- Custom back-half: 1–256 letters, digits,
-or_. Unique on its domain: across SendURL on snu.to (taken: 409slug_taken), so the example leaves it out; on one of your domains, within that domain. Reserved in any letter case, on every domain:health,api,docs,robots.txt,favicon.ico,sitemap.xml,_next. Empty or left out: a random slug. - titlestringOptional
- A label for the link in your console and API responses. Up to 255 characters.
- expiresAtstring | nullOptional
- When the link stops redirecting: ISO 8601 with
Zor an offset, e.g.2030-12-31T23:59:59Z. Must be in the future and at most 100 years ahead. Left out ornull: never expires. Pro and above: on a lower plan setting it is 403plan_upgrade_required(feature: "link_expiry"). - passwordstring | nullOptional
- Visitors must type it before they are redirected. 6–128 characters, with no whitespace of any kind (space, tab, line break) at the start or end. Needs an
httporhttpsdestinationUrl, andhttporhttpsiosUrl/androidUrlwhen set. Left out ornull: no password. Pro and above: on a lower plan setting it is 403plan_upgrade_required(feature: "link_password"). - folderIduuidOptional
- The folder to create the link in. Left out: the key's folder (folder-level key) or the workspace's Default folder.
- projectIduuidOptional
- Deprecated: the old name of
folderId, accepted with the same meaning. Sending both with different values is 400validation_erroronfolderId. - domainIduuid | nullOptional
- The domain to create the link on: the
idof an active domain fromGET /domains(a pending one is 409domain_not_active). Left out ornull: snu.to. A link's domain can't be changed later: printed QR codes carry it.
Response
201 Created. The new link object.
- Unknown body fields are ignored. Send the body as JSON with
Content-Type: application/json. - The response never contains a password, only
passwordProtected.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A field breaks a rule; issues says which. |
| 403 | link_limit_reached | The workspace has used its plan's links. The body adds limit and current. |
| 403 | plan_upgrade_required | A feature your plan doesn't include: a password or an expiry (feature: "link_password" or "link_expiry"), or an abTest without destinationUrl as a variant weighted at least 50 (feature: "edit_destination"); or a qrStyle with a paid design option (feature: "qr_style"); or a custom preview or an A/B test below Pro (feature: "link_preview"; "ab_test", with limitType); or geoTargets with rules below Pro (feature: "geo_targeting", requiredPlan: "premium"). The body adds feature and requiredPlan. Nothing is created. |
| 403 | project_forbidden | A folder-level key named a different folderId. |
| 404 | project_not_found | folderId is not a folder of this workspace. |
| 404 | domain_not_found | domainId is not a domain of this workspace, or it was removed. |
| 409 | slug_taken | Another link on the same domain already uses that slug. Rarely, a random slug collides with an existing one too: send the request again. |
| 422 | unsafe_destination | One of our own rules (a user name in the URL, a program or installer download) catches a web URL the link would send visitors to (destinationUrl, an iosUrl or androidUrl, or an A/B test variant). Web URLs include http(s), the web URL a browser scheme opens (x-safari-https://, googlechromes://, brave://open-url?url=, an Android intent: with scheme=https or a browser fallback URL), and a web URL in a parameter of any other app link (myapp://open?link=https%3A%2F%2F…); and the page some common redirect links send visitors to; a plain app link is not checked, and neither is a URL in another http(s) URL's query, such as a share or tracking link. The body adds field, provider (own_rules) and threatType. Nothing is created. A threat-intelligence service never answers this error: the same URLs are checked right after the link is saved, and a listed link is taken down, usually within seconds, and at the latest the next time we check all links (moderated becomes true and active false). |
| 422 | too_many_urls | The link would hold more than 15 web URLs in total: its destinationUrl, iosUrl, androidUrl, A/B test variants and country rules' URLs, plus the web URLs found inside them (as described for unsafe_destination), each distinct URL counted once; or one of those fields is over its own limits: more than 8 web URLs in one address (itself included), web URLs nested too deep inside one another, or a URL too complex to check; nothing is ever cut short. The body adds limit (15), current (the count) and reason (link for the 15 in total; urls, depth or work for one field), and for one field over its own limits field and fieldLimit (8). The message says which limit was hit. Nothing is created. |
| 409 | domain_not_active | The domain is still waiting for its DNS records or certificate, or failed. GET /domains/:id says why. |
| 503 | domains_unavailable | Domains are switched off for now. Retry later. |
curl -X POST "https://api.sendurl.to/api/v1/links" \
-H "Authorization: Bearer $SENDURL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destinationUrl": "https://example.com/blog/launch",
"title": "Launch post"
}'{
"id": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"destinationUrl": "https://example.com/blog/launch",
"iosUrl": null,
"androidUrl": null,
"title": "Launch post",
"active": true,
"moderated": false,
"expiresAt": null,
"passwordProtected": false,
"visitsCount": 0,
"visitsLimit": null,
"guestToken": null,
"folderId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"projectId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"orgId": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"domainId": null,
"domain": null,
"userId": "e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
"createdAt": "2026-10-13T09:12:44.123Z",
"updatedAt": "2026-10-13T09:12:44.123Z",
"shortUrl": "https://snu.to/x7Kp2",
"qrUrl": "https://snu.to/x7Kp2?q"
}Links
List links
GET/api/
The workspace's links, newest first unless sort says otherwise, one page at a time. A folder-level key sees its own folder only.
Every page also carries summary for the whole scope (all pages, honouring folderId), the workspace's usage against its link limit, and its plan, and echoes the filter and sort it applied.
AccessAny API key.
Permission (scope)links:read
Query parameters
- folderIduuidOptional
- Only this folder's links. Left out: the whole workspace (a folder-level key: its folder). Any other folder is 404
project_not_found. - projectIduuidOptional
- Deprecated: the old name of
folderId, accepted with the same meaning. Sending both with different values is 400validation_erroronfolderId. - statusstringOptional
- One or more of
active(enabled, not moderated, not expired),disabled(switched off or disabled by moderation),expired(enabled but pastexpiresAt),protected(has a password) andlimit_reached(used up its visits), comma-separated: links in any of them. Every link is in exactly one of the first three. Left out: every link. - tagIdsstringOptional
- Tag ids (
GET /tags), comma-separated, up to 20: only links carrying any of them. - sortstringOptional
created_desc(default: newest first),clicks_descorclicks_asc(byvisitsCount, the link's visible click count). Acursoronly continues the sort it came from.- qstringOptional
- Search: only links whose
slug,destinationUrlortitlecontains this text, ignoring case.%,_and\match themselves. Trimmed; blank is no search; up to 200 characters. Works withfolderId,statusandsort; send the sameqwith eachcursor. - includestringOptional
- Optional extras per link, comma-separated. Today only
qrScans: each link also carriesqrScans, its all-time QR scans (clicks marked as scans, a part oftotalClicks). Anything else is a 400 oninclude. - limitintegerOptional
- Page size, 1 to 10. Default 10.
- cursorstringOptional
pagination.nextCursorfrom the previous page. Leave it out for the first page.
Response
200 OK. Rows are link objects without updatedAt and guestToken, plus totalClicks.
summary.totalLinksis every link in scope,summary.activeLinksthose enabled and not expired,summary.totalClicksall their clicks.summaryignoresstatus.- With
statusorq,pagination.totalis the number of matching links; without either, every link in scope. usage.linksUsedcounts the whole workspace, whateverfolderIdorstatussays: the link limit is per workspace.- The clicks sorts are approximate while links get traffic: a link clicked between two page requests can move past your cursor and be skipped (
clicks_desc) or come back on a later page (clicks_asc). Dedupe rows byidwhen you page through them. The default sort never shifts. qis a substring match, not a ranked search: the order is stillsort's. A shortq(one or two characters) matches widely; it works, but a longer one narrows faster.- Check the echoes before you act on a page:
filter.status,filter.qandsortsay what was applied.qis newer still: an API without it ignores it and has nofilter.qin the body.statusandsortare new, and an older API (briefly, while a release rolls out) ignores them: it answers every link, newest first, with nofilterorsortin the body, and refuses acursorfrom a clicks sort with a 400. A page without the echo you asked for did not apply it.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A malformed folderId, folderId and projectId that differ, an unknown status or sort, q over 200 characters, limit outside 1–10, a bad cursor or one issued for another sort, or offset sent. |
| 404 | project_not_found | folderId is outside the key's scope. |
cURL
curl "https://api.sendurl.to/api/v1/links?limit=2" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"links": [
{
"id": "0e9d8c7b-6a5f-4e3d-9c2b-1a0f9e8d7c6b",
"slug": "fall-sale",
"destinationUrl": "https://example.com/sale",
"iosUrl": null,
"androidUrl": null,
"title": "Fall sale",
"active": true,
"moderated": false,
"expiresAt": null,
"passwordProtected": false,
"visitsCount": 0,
"visitsLimit": null,
"folderId": "7c1e5a9b-2d4f-4e6a-8b3c-0f9d1e2a3b4c",
"projectId": "7c1e5a9b-2d4f-4e6a-8b3c-0f9d1e2a3b4c",
"orgId": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"domainId": null,
"domain": null,
"userId": "e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
"createdAt": "2026-10-14T07:40:02.518Z",
"totalClicks": 0,
"shortUrl": "https://snu.to/fall-sale",
"qrUrl": "https://snu.to/fall-sale?q"
},
{
"id": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"destinationUrl": "https://example.com/blog/launch",
"iosUrl": null,
"androidUrl": null,
"title": "Launch post",
"active": true,
"moderated": false,
"expiresAt": "2030-12-31T23:59:59.000Z",
"passwordProtected": false,
"visitsCount": 42,
"visitsLimit": null,
"folderId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"projectId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"orgId": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"domainId": null,
"domain": null,
"userId": "e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
"createdAt": "2026-10-13T09:12:44.123Z",
"totalClicks": 42,
"shortUrl": "https://snu.to/x7Kp2",
"qrUrl": "https://snu.to/x7Kp2?q"
}
],
"summary": {
"totalLinks": 12,
"activeLinks": 11,
"totalClicks": 1873
},
"usage": {
"linksUsed": 12,
"linksLimit": 25
},
"plan": {
"name": "Free",
"linksLimit": 25,
"visitsLimitPerLink": null
},
"filter": {
"status": null,
"tagIds": null,
"q": null
},
"sort": "created_desc",
"pagination": {
"limit": 2,
"nextCursor": "WyIyMDI2LTEwLTEzVDA5OjEyOjQ0LjEyMzQ1NloiLCI1ZDhmMmExYy03YjNlLTRjOWQtYTBlMS02ZjJiOGM0ZDFlN2EiXQ",
"hasMore": true,
"total": 12
}
}Links
Export links (CSV)
GET/api/
Every link that matches, in one CSV file, newest first. It is not a page: it streams every matching row, however many, so there is no cursor and no limit.
The links' own data only: never their clicks, and never a password (password_protected says whether there is one). Deleted links are left out.
AccessPro and above (below it, 403 plan_upgrade_required with feature: "csv_export"). Any API key. A folder-level key exports its own folder.
Permission (scope)links:read
Query parameters
- folderIduuidOptional
- Only this folder's links. Left out: the whole workspace (a folder-level key: its folder). Any other folder is 404
project_not_found. - projectIduuidOptional
- Deprecated: the old name of
folderId, accepted with the same meaning. Sending both with different values is 400validation_erroronfolderId. - statusstringOptional
- One or more of
active(enabled, not moderated, not expired),disabled(switched off or disabled by moderation),expired(enabled but pastexpiresAt),protected(has a password) andlimit_reached(used up its visits), comma-separated: links in any of them. Every link is in exactly one of the first three. Left out: every link. - qstringOptional
- Only links whose
slug,destinationUrlortitlecontains this text, ignoring case, as onGET /links. Up to 200 characters.
Response
200 OK. Content-Type: text/csv; charset=utf-8, with Content-Disposition: attachment; filename="sendurl-links-YYYY-MM-DD.csv" (the UTC date). A header row, then one row per link.
- Columns, in this order:
id,short_url,domain,slug,destination_url,ios_url,android_url,title,project,active,visits,visits_limit,expires_at,password_protected,created_at,updated_at. domainis the link's hostname:snu.to, or the custom domain or subdomain it is on (links on a removed domain are included, with its name).ios_urlandandroid_urlare the link's iPhone and iPad and Android addresses, empty when not set.projectis the folder's name (the column keeps its old name).activeistrueorfalse,visitsthe visit count, andvisits_limitis empty when visits are unlimited. Timestamps are ISO 8601 in UTC, with milliseconds.- The file is UTF-8 with a byte order mark (so spreadsheets read accents and emoji correctly), every cell in double quotes, lines ending in CRLF (RFC 4180). A text cell that starts with
=,+,-,@, a tab or a carriage return gets a leading', so a spreadsheet doesn't run it as a formula: a slug-abcreads'-abc, andshort_urlkeeps the exact slug. sortandcursorare ignored;limitandoffsetare refused with 400validation_error.- If something fails partway, the connection is cut before the end, so a download that completes is the whole file. Retry the request.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A malformed folderId, folderId and projectId that differ, an unknown status, q over 200 characters, or limit or offset sent. |
| 404 | project_not_found | folderId is outside the key's scope. |
| 503 | export_unavailable | An export is already running (one per workspace, a few per server). Retry after retryAfterSeconds. |
cURL
curl "https://api.sendurl.to/api/v1/links/export.csv?status=active" \
-H "Authorization: Bearer $SENDURL_API_KEY" \
--fail -o links.csv"id","short_url","domain","slug","destination_url","ios_url","android_url","title","project","active","visits","visits_limit","expires_at","password_protected","created_at","updated_at"
"5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a","https://snu.to/x7Kp2","snu.to","x7Kp2","https://example.com/blog/launch","","","Launch post","Default","true","42","100000","2030-12-31T23:59:59.000Z","false","2026-10-13T09:12:44.123Z","2026-10-14T10:05:31.904Z"Links
Retrieve a link
GET/api/
One link with its click counts: totalClicks, and qrScans for the clicks that came through its QR code.
AccessAny API key, for links in the folder or workspace it reaches.
Permission (scope)links:read
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found.
Response
200 OK. The link object plus totalClicks and qrScans.
- An API key never receives a link's password, only
passwordProtected. The owner sees the password in the console. - Sent with
Cache-Control: no-store, private.
Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
cURL
curl "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"id": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"destinationUrl": "https://example.com/blog/launch",
"iosUrl": null,
"androidUrl": null,
"title": "Launch post",
"active": true,
"moderated": false,
"expiresAt": "2030-12-31T23:59:59.000Z",
"passwordProtected": false,
"visitsCount": 42,
"visitsLimit": null,
"guestToken": null,
"folderId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"projectId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"orgId": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"domainId": null,
"domain": null,
"userId": "e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
"createdAt": "2026-10-13T09:12:44.123Z",
"updatedAt": "2026-10-13T09:12:44.123Z",
"shortUrl": "https://snu.to/x7Kp2",
"qrUrl": "https://snu.to/x7Kp2?q",
"totalClicks": 42,
"qrScans": 9
}Links
Update a link
PATCH/api/
Changes only the fields you send; at least one is required. The slug can't be changed.
Set active to false to switch a link off without deleting it: its short URL then answers 404 and it keeps its slug and clicks.
AccessAny API key, for links in the folder or workspace it reaches.
Permission (scope)links:write
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found.
Body parameters
- destinationUrlstringOptional
- A new absolute URL to redirect to (its UTM parameters included), up to 32,768 characters (longer is 400 on
destinationUrl). Changing it is Starter and above, a number of times a month by plan (10 on Starter, 50 on Pro, 1,000 on Growth, unlimited on Enterprise): on Free a different URL is 403plan_upgrade_requiredwithfeature: "edit_destination", and past the month's number 403edit_limit_reachedwithlimit,current,periodandresetsAt; sending the stored one again is fine. - iosUrlstring | nullOptional
- Sets or replaces where iPhone and iPad visitors go (same rules as on create; setting or changing one is Pro and above);
nullor""removes it on every plan, so they get the destination. - androidUrlstring | nullOptional
- Sets or replaces where Android visitors go (same rules as on create);
nullor""removes it, so they get the destination. - tagIdsuuid[] | nullOptional
- Replaces the link's tags (up to 10);
nullor[]removes them all. - qrStyleobject | nullOptional
- The QR code's design:
{ v: 2, fg: "#rrggbb", bg: "#rrggbb", dots, corners, cornerColor, gradient, logo, frame }, every key present (nullfor none; av: 1object with only the first five keys is still accepted).dots:square,rounded,dots,classy,classy-rounded,extra-rounded,diamond,starorvertical.corners:square,rounded,dots,extra-rounded,leaf,leaf-inverse,circle-square,square-circleorsharp.cornerColor:"#rrggbb"ornull.gradient:{ type: "linear" | "radial", from, to, angle }(angle 0-359) ornull.logo:{ kind: "icon", id }(sendurl,facebook,instagram,x,youtube,linkedin,tiktok),{ kind: "text", text }(1-10 characters) ornull.frame:{ id, text, color }(plain,caption,handwritten,caption-bar-bottom,caption-bar-top,caption-bold,handwritten-bold,caption-top-bottom,pill,follow; text 1-20 characters; color"#rrggbb"ornull) ornull. The code must stay dark on light with a contrast of at least 4:1, every gradient stop and the corner colour included (else 400 onqrStyle).null: the plain code. Every plan may use the square, rounded and dots patterns, the square and rounded corners, the 8 colour presets and theplain,captionandhandwrittenframes in their default colour. Every other pattern, corner style, colour and frame is Starter and above (else 403plan_upgrade_required,feature: "qr_style"); alogo, agradientand acornerColorare Pro and above (feature: "qr_brand"). A link keeps a paid part it already has while it stays unchanged, and may drop it. The encoded URL is alwaysqrUrl. - previewobject | nullOptional
- The link's custom preview: the title, description and image that WhatsApp, X, LinkedIn, Facebook, Slack and other apps show when the short URL is shared.
{ title, description?, image? }:title1–120 characters (required),descriptionup to 300,imageanhttps://URL of up to 2048 characters. Line breaks and control characters become spaces. A bad field is 400 onpreview.title,preview.descriptionorpreview.image.nullremoves it. Custom previews are Pro and above, with a number of new previews a month by plan (250 on Pro, 1,000 on Growth, unlimited on Enterprise): below Pro, 403plan_upgrade_requiredwithfeature: "link_preview"; past the month's number, 403preview_limit_reachedwithlimit,current,periodandresetsAt. - abTestobject | nullOptional
- An A/B test:
{ variants: [{ id, url, weight }, …] }with 2–4 variants.idisa,b,cord(each once; keep a variant's id when you edit the test, so its visitors stay on it),urlanhttp://orhttps://address of up to 2048 characters,weighta whole percentage from 1 to 99, and the weights add up to 100. People are split between the variants by weight and keep their variant for 30 days; iPhone and Android visitors with an app link get the app link, and bots getdestinationUrl. A bad field is 400 onabTest.variants,abTest.variants.<i>.url,abTest.variants.<i>.weightorabTest.variants.<i>.id. On a link with a test it edits it;nullends it without a winner (to keep one variant, use the winner endpoint). A/B tests are Pro and above, up to 4 variants; below Pro a new test is 403plan_upgrade_requiredwithfeature: "ab_test"(limitType: "tests", or"variants"past 4). - geoTargetsobject | nullOptional
- Country rules:
{ rules: [{ id?, countries, url }, …] }with 1–10 rules.countriesare two-letter ISO 3166-1 codes (any case; stored upper-case and sorted), each country in one rule only;urlanhttp://orhttps://address of up to 2048 characters. Visitors from a rule's countries go to itsurl; everyone else, visitors whose country is unknown and bots getdestinationUrl, and iPhone and Android visitors with an app link get the app link. A visitor a rule sends is not split by an A/B test. Each rule gets anidthat stays with it: send the ids back when you edit the rules, so each rule keeps its clicks. A bad field is 400 ongeoTargetsor its field (geoTargets.rules.<i>.countries.<j>,geoTargets.rules.<i>.url). Left out: unchanged;nullor{ rules: [] }removes them. Pro and above: setting or changing rules on a lower plan is 403plan_upgrade_requiredwithfeature: "geo_targeting"andrequiredPlan: "premium"; removing them, or sending them back unchanged, works on every plan. - titlestring | nullOptional
- Up to 255 characters;
nullclears it. - activebooleanOptional
falsedisables the link,trueenables it again.- expiresAtstring | nullOptional
- ISO 8601 with
Zor an offset, in the future, at most 100 years ahead.nullremoves the expiry (allowed on every plan). Pro and above: on a lower plan setting it is 403plan_upgrade_required(feature: "link_expiry"). - passwordstring | nullOptional
- Sets or replaces the password (same rules as on create);
nullremoves it (allowed on every plan). Pro and above: on a lower plan setting it is 403plan_upgrade_required(feature: "link_password"). - folderIduuidOptional
- Moves the link to another folder of the workspace. A folder-level key can only name its own folder.
- projectIduuidOptional
- Deprecated: the old name of
folderId, accepted with the same meaning. Sending both with different values is 400validation_erroronfolderId.
Response
200 OK. The updated link object.
- A link with a password must keep an
http/httpsdestination,iosUrlandandroidUrl: setting any of them to another scheme is a 400 on that field, and setting a password on a link where one of them isn'thttp/httpsis a 400 onpassword. - A link disabled by moderation can be edited or kept off, but not switched back on.
- A link's domain can't be changed: a body with
domainIdis a 400validation_error, even with other fields.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | No field sent, or a field breaks a rule. |
| 403 | link_limit_reached | active: true on a switched-off link while the workspace's active links already number its plan's limit. Only after a refund or chargeback cancelled the workspace's plan. The body adds limit. |
| 403 | link_moderated | active: true on a link disabled by moderation. |
| 403 | plan_upgrade_required | A feature your plan doesn't include: a different destinationUrl (feature: "edit_destination"), or setting or changing a password or an expiry, or a qrStyle paid design option the link doesn't already have unchanged (feature: "qr_style"); or a custom preview on a link without one below Pro (feature: "link_preview"); or setting or changing country rules below Pro (feature: "geo_targeting", requiredPlan: "premium"). The body adds feature and requiredPlan. Nothing is changed. |
| 403 | project_forbidden | A folder-level key named a different folderId. |
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
| 404 | project_not_found | folderId is not a folder of this workspace. |
| 422 | unsafe_destination | One of our own rules catches a web URL this request sets (a new destinationUrl, iosUrl or androidUrl, or a new A/B test variant), or, when it switches an inactive link back on (active: true), any web URL the link would then send visitors to (its destination, app targets and A/B test variants, as stored or as this request changes them), except for a rule our support team cleared that stored URL of after a review; the link stays off. Web URLs include http(s), the web URL a browser scheme opens (x-safari-https://, googlechromes://, brave://open-url?url=, an Android intent: with scheme=https or a browser fallback URL), and a web URL in a parameter of any other app link; and the page some common redirect links send visitors to; a plain app link is not checked, and neither is a URL in another http(s) URL's query, such as a share or tracking link. The body adds field, provider (own_rules) and threatType. Nothing is changed. A threat-intelligence service never answers this error: the same URLs are checked right after the link is saved, and a listed link is taken down, usually within seconds, and at the latest the next time we check all links (moderated becomes true and active false). |
| 422 | too_many_urls | This request adds a web URL the link doesn't hold yet (in destinationUrl, iosUrl, androidUrl, an A/B test variant or a country rule) and the whole link would then hold more than 15 web URLs in total, counted as on create: every URL it would keep, not only the ones this request adds; or a URL this request sets is over one field's own limits (as on create, with reason, field and fieldLimit). The body adds limit (15), current (the count) and reason. Nothing is changed. A request that adds no new web URL, such as a new title, active, removing a URL or ending the test, is never refused for this, and neither is picking a winner. |
cURL
curl -X PATCH "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a" \
-H "Authorization: Bearer $SENDURL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": false
}'{
"id": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"destinationUrl": "https://example.com/blog/launch",
"iosUrl": null,
"androidUrl": null,
"title": "Launch post",
"active": false,
"moderated": false,
"expiresAt": "2030-12-31T23:59:59.000Z",
"passwordProtected": false,
"visitsCount": 42,
"visitsLimit": null,
"guestToken": null,
"folderId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"projectId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"orgId": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"domainId": null,
"domain": null,
"userId": "e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
"createdAt": "2026-10-13T09:12:44.123Z",
"updatedAt": "2026-10-14T10:05:31.904Z",
"shortUrl": "https://snu.to/x7Kp2",
"qrUrl": "https://snu.to/x7Kp2?q"
}Links
Pick an A/B test's winner
POST/api/
Makes one variant of the link's running A/B test its destination and ends the test, in one step: destinationUrl becomes the variant's URL and abTest becomes null. Every visitor goes there from the next visit.
The test's results stay in the console's analytics.
AccessAny API key, for links in the folder or workspace it reaches.
Permission (scope)links:write
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found.
Body parameters
- variantIdstringRequired
- The winning variant's id:
a,b,cord, one of the running test's.
Response
200 OK. The updated link object.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | variantId isn't one of the running test's variants. |
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
| 409 | ab_test_not_running | The link has no A/B test. |
| 422 | unsafe_destination | One of our own rules catches the winner's URL, when it differs from the current destinationUrl. The body adds field (destinationUrl), provider (own_rules) and threatType. Nothing is changed and the test keeps running. A threat-intelligence service never answers this error: the same URLs are checked right after the link is saved, and a listed link is taken down, usually within seconds, and at the latest the next time we check all links (moderated becomes true and active false). |
cURL
curl -X POST "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a/ab-test/winner" \
-H "Authorization: Bearer $SENDURL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"variantId": "b"
}'{
"id": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"destinationUrl": "https://example.com/blog/launch-b",
"iosUrl": null,
"androidUrl": null,
"title": "Launch post",
"active": true,
"moderated": false,
"expiresAt": "2030-12-31T23:59:59.000Z",
"passwordProtected": false,
"visitsCount": 0,
"visitsLimit": null,
"guestToken": null,
"folderId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"projectId": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"orgId": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"domainId": null,
"domain": null,
"userId": "e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
"createdAt": "2026-10-13T09:12:44.123Z",
"updatedAt": "2026-10-14T10:05:31.904Z",
"shortUrl": "https://snu.to/x7Kp2",
"qrUrl": "https://snu.to/x7Kp2?q",
"abTest": null
}Links
Delete a link
DELETE/api/
Deletes the link. Its short URL and QR code stop working (they show a not-found page and count no clicks), and the link and its click stats are gone from every route and list. There is no undo.
The slug stays reserved: no new link can take it, so a printed QR code never points somewhere new. A deleted link still counts toward your plan's link limit.
To stop a link but keep it, its clicks and the option to turn it back on, update it with active: false instead.
Deleting needs a paid plan. On the Free plan, disable the link with active: false.
AccessAny API key, for links in the folder or workspace it reaches, on a paid plan.
Permission (scope)links:delete
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found.
Response
200 OK. A confirmation.
Errors
| Status | Code | Meaning |
|---|---|---|
| 403 | plan_upgrade_required | The workspace is on the Free plan. Disable the link instead, or upgrade. |
| 403 | link_moderated | The link was disabled by moderation; it can't be deleted. |
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
cURL
curl -X DELETE "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"message": "Link deleted"
}Clicks
Daily clicks
GET/api/
The link's clicks per day (UTC), oldest first, over its whole history. Days without clicks are left out. Not paginated.
AccessAny API key, for links in the folder or workspace it reaches.
Permission (scope)links:read
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found.
Response
200 OK. An array of { date, count }.
Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
cURL
curl "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a/stats" \
-H "Authorization: Bearer $SENDURL_API_KEY"[
{
"date": "2026-10-12",
"count": 14
},
{
"date": "2026-10-13",
"count": 19
},
{
"date": "2026-10-14",
"count": 9
}
]Clicks
List clicks
GET/api/
Every recorded visit of the link, newest first, one page at a time. Use GET /links/:id for the total.
AccessAny API key, for links in the folder or workspace it reaches.
Permission (scope)links:read
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found.
Query parameters
- limitintegerOptional
- Page size, 1 to 10. Default 10.
- cursorstringOptional
pagination.nextCursorfrom the previous page. Leave it out for the first page.
Response
200 OK. Click objects. There is no total here.
Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
| 400 | validation_error | limit outside 1–10, a cursor this API didn't issue, or offset sent. |
cURL
curl "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a/clicks?limit=1" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"clicks": [
{
"id": "a4c6e8f0-1b3d-4e5f-9a7b-2c4d6e8f0a1b",
"linkId": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1",
"referer": null,
"country": "DE",
"city": "Berlin",
"cityLocked": false,
"device": "mobile",
"deviceVendor": "Apple",
"deviceModel": "iPhone",
"browser": "Mobile Safari",
"browserVersion": "18.6",
"browserMajor": "18",
"browserType": null,
"engineName": "WebKit",
"engineVersion": "605.1.15",
"os": "iOS",
"osVersion": "18.6",
"cpuArchitecture": null,
"source": "qr",
"clickedAt": "2026-10-14T08:03:11.482Z"
}
],
"pagination": {
"limit": 1,
"nextCursor": "WyIyMDI2LTEwLTE0VDA4OjAzOjExLjQ4MjkxM1oiLCJhNGM2ZThmMC0xYjNkLTRlNWYtOWE3Yi0yYzRkNmU4ZjBhMWIiXQ",
"hasMore": true
}
}Clicks
Retrieve a click
GET/api/
One click of the link, however old.
AccessAny API key, for links in the folder or workspace it reaches.
Permission (scope)links:read
Path parameters
- iduuidRequired
- The link's
id. Anything that isn't a link of the key's scope is 404link_not_found. - clickIduuidRequired
- The click's
id, from the clicks list.
Response
200 OK. A click object.
Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | link_not_found | No such link in the key's workspace (or, for a folder-level key, its folder). |
| 404 | click_not_found | No click with that id on this link. |
cURL
curl "https://api.sendurl.to/api/v1/links/5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a/clicks/a4c6e8f0-1b3d-4e5f-9a7b-2c4d6e8f0a1b" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"id": "a4c6e8f0-1b3d-4e5f-9a7b-2c4d6e8f0a1b",
"linkId": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Mobile/15E148 Safari/604.1",
"referer": null,
"country": "DE",
"city": "Berlin",
"cityLocked": false,
"device": "mobile",
"deviceVendor": "Apple",
"deviceModel": "iPhone",
"browser": "Mobile Safari",
"browserVersion": "18.6",
"browserMajor": "18",
"browserType": null,
"engineName": "WebKit",
"engineVersion": "605.1.15",
"os": "iOS",
"osVersion": "18.6",
"cpuArchitecture": null,
"source": "qr",
"clickedAt": "2026-10-14T08:03:11.482Z"
}Analytics
Analytics overview
GET/api/
The dashboard of a date range: clicks, unique visitors, daily average and QR scans with the previous period, the clicks over time, the top links, tags and social sources, and the top devices, browsers, systems, countries and referrers.
For the whole workspace (a workspace key without folderId), one folder, or one link.
AccessAny API key, over the folder or workspace it reaches: a folder-level key reads its own folder only.
Permission (scope)analytics:read
Query parameters
- fromdateRequired
- First day,
YYYY-MM-DD, intz. Not before the plan's history window (limits.earliest): else 400range_outside_history. - todateRequired
- Last day, inclusive,
YYYY-MM-DD, intz. Not beforefrom; tomorrow is answered as today, later is 400. - tzstringOptional
- The time zone days are counted in:
UTC(default) or an IANA name such asEurope/Berlin.range.tzechoes the name used. - folderIduuidOptional
- Only this folder's links. Without it, a workspace key reads the whole workspace and a folder-level key its own folder; another folder is 404
project_not_found. - projectIduuidOptional
- Deprecated: the old name of
folderId. - linkIduuidOptional
- Only this link (in
folderIdwhen both are given). A link outside the key's scope is 404link_not_found. - comparebooleanOptional
true(default) adds the previous period of the same length:previous,kpis.previousand each row'spreviousClicksandchange.
Response
200 OK. On Starter (30 days of history). Breakdown rows are the top 7; rest is the other values' clicks, unknown the clicks without one.
- Analytics keep today and the days before it that the plan allows: Free 7 days, Starter 30 days, Pro 180 days, Growth 365 days, Enterprise lifetime.
limitsin every answer says the window (historyDays,earliest).GET /links/:id/statsand the clicks endpoints keep the whole history. - On Free, unique visitors, cities and UTM breakdowns are Starter and above:
uniqueVisitorsisnull,lockedsays what is withheld, andcityisnullwithcityLocked: trueon each click. - A click counts toward its link's current folder; deleted links' clicks are left out. Crawlers and link-preview fetchers count. Unique visitors are an approximation (distinct addresses); no address is ever returned.
- Every answer is
Cache-Control: private, no-store. - A workspace key without
folderIdreads the whole workspace, which is slower; passfolderIdorlinkIdwhen you can. API keys share analytics capacity with the dashboard and get a smaller share of it, counted on each API server: one request of a workspace's keys runs at a time and two across all keys, and at most 2 more of a workspace's keys (10 across all keys) wait in line for up to 3 seconds; beyond that a request is refused at once. Send analytics requests one after another, never in parallel, and on a 503analytics_unavailablewait theRetry-Afterseconds before retrying. seriesis by hour for a range of two days or less, else by day, intz; its clicks add up tokpis.clicks.shareis a fraction of the clicks (0–1),changethe change from the previous period (0.25 = +25 %),nullwhen the previous period had none.topLinks,topTagsandlinksarenullwithlinkId. A click counts toward every tag of its link, so tag shares can add up past 1.olderClicks(Free only, elsenull) says whether there are clicks before the window.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A parameter breaks a rule (a date that doesn't exist, to before from, an unknown tz); issues says which. |
| 400 | range_outside_history | from is before the plan's history window. The body adds historyDays and earliest. |
| 404 | project_not_found | folderId isn't a folder of the workspace, or isn't a folder-level key's own folder. |
| 404 | link_not_found | linkId isn't a link in the key's scope. |
| 503 | analytics_unavailable | Too busy or too slow just now. Retry after Retry-After seconds. |
cURL
curl "https://api.sendurl.to/api/v1/analytics/overview?from=2026-10-12&to=2026-10-14&tz=UTC" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"range": {
"from": "2026-10-12",
"to": "2026-10-14",
"tz": "UTC",
"days": 3,
"granularity": "day",
"start": "2026-10-12T00:00:00.000Z",
"end": "2026-10-15T00:00:00.000Z"
},
"previous": {
"start": "2026-10-09T00:00:00.000Z",
"end": "2026-10-12T00:00:00.000Z"
},
"limits": {
"historyDays": 90,
"earliest": "2026-07-16"
},
"kpis": {
"clicks": 42,
"uniqueVisitors": 31,
"dailyAverage": 14,
"qrScans": 5,
"previous": {
"clicks": 35,
"uniqueVisitors": 27,
"dailyAverage": 11.7,
"qrScans": 3
}
},
"locked": {
"uniqueVisitors": false,
"city": false,
"utm": false
},
"links": {
"total": 12,
"created": 2,
"createdPrevious": 1
},
"topLinks": [
{
"link": {
"id": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"title": "Autumn launch",
"shortUrl": "https://snu.to/x7Kp2",
"active": true,
"moderated": false,
"expiresAt": null,
"passwordProtected": false
},
"clicks": 30,
"previousClicks": 24,
"share": 0.714,
"change": 0.25
}
],
"topTags": {
"rows": [
{
"tag": {
"id": "0e7b1c2d-3a4f-4b5c-8d6e-7f8091a2b3c4",
"name": "Campaigns",
"color": "blue"
},
"clicks": 18,
"previousClicks": 12,
"share": 0.429,
"change": 0.5
}
],
"untagged": {
"clicks": 24,
"previousClicks": 23,
"share": 0.571,
"change": 0.043
}
},
"social": {
"rows": [
{
"key": {
"kind": "host",
"host": "instagram.com",
"source": "instagram",
"label": "Instagram"
},
"clicks": 6,
"previousClicks": null,
"share": 1,
"change": null
}
],
"total": 6,
"previousTotal": null
},
"olderClicks": null,
"series": [
{
"start": "2026-10-12T00:00:00.000Z",
"local": "2026-10-12",
"clicks": 14
},
{
"start": "2026-10-13T00:00:00.000Z",
"local": "2026-10-13",
"clicks": 19
},
{
"start": "2026-10-14T00:00:00.000Z",
"local": "2026-10-14",
"clicks": 9
}
],
"breakdowns": {
"device": {
"rows": [
{
"key": "mobile",
"clicks": 28
},
{
"key": "desktop",
"clicks": 14
}
],
"unknown": 0,
"rest": 0,
"total": 42
},
"browser": {
"rows": [
{
"key": "Chrome",
"clicks": 25
},
{
"key": "Safari",
"clicks": 17
}
],
"unknown": 0,
"rest": 0,
"total": 42
},
"os": {
"rows": [
{
"key": "Android",
"clicks": 20
},
{
"key": "iOS",
"clicks": 12
},
{
"key": "Windows",
"clicks": 10
}
],
"unknown": 0,
"rest": 0,
"total": 42
},
"country": {
"rows": [
{
"key": "IN",
"clicks": 22
},
{
"key": "US",
"clicks": 15
}
],
"unknown": 5,
"rest": 0,
"total": 42
},
"referrer": {
"rows": [
{
"key": {
"kind": "direct",
"host": null,
"source": null,
"label": "Direct"
},
"clicks": 31
},
{
"key": {
"kind": "host",
"host": "instagram.com",
"source": "instagram",
"label": "Instagram"
},
"clicks": 6
},
{
"key": {
"kind": "qr",
"host": null,
"source": null,
"label": "QR scan"
},
"clicks": 5
}
],
"rest": 0,
"total": 42
}
},
"generatedAt": "2026-10-14T16:20:05.118Z"
}Analytics
Analytics breakdown
GET/api/
One dimension of a date range, ranked by clicks: links, countries, cities, devices, browsers, systems, referrers, UTM values, an A/B test's variants or a link's country rules, each with its unique visitors, share, the previous period and a sparkline.
AccessAny API key, over the folder or workspace it reaches: a folder-level key reads its own folder only.
Permission (scope)analytics:read
Query parameters
- fromdateRequired
- First day,
YYYY-MM-DD, intz. Not before the plan's history window (limits.earliest): else 400range_outside_history. - todateRequired
- Last day, inclusive,
YYYY-MM-DD, intz. Not beforefrom; tomorrow is answered as today, later is 400. - tzstringOptional
- The time zone days are counted in:
UTC(default) or an IANA name such asEurope/Berlin.range.tzechoes the name used. - folderIduuidOptional
- Only this folder's links. Without it, a workspace key reads the whole workspace and a folder-level key its own folder; another folder is 404
project_not_found. - projectIduuidOptional
- Deprecated: the old name of
folderId. - linkIduuidOptional
- Only this link (in
folderIdwhen both are given). A link outside the key's scope is 404link_not_found. - dimensionstringRequired
link,country,city,device,browser,os,referrer,utm,variantorgeo_rule.linkranks every link in scope, those without clicks too, and refuseslinkId;variantandgeo_ruleneedlinkId.geo_rule(every plan) keys each row by the country rule's id (a string), addsrule: { countries, url }as the link has it now (nullfor a rule removed since) and has no unique visitors (null); its body adds the link'sgeoTargets.cityandutmare Starter and above.- orderstringOptional
desc(default) orasc.- limitintegerOptional
- Rows, 1–50. Default 25.
- bystringOptional
dimension=utmonly:source(default),mediumorcampaign, read from each link's destination URL.- categorystringOptional
dimension=referreronly:socialkeeps the social networks.
Response
200 OK. On Pro. On Free each uniqueVisitors is null.
- Analytics keep today and the days before it that the plan allows: Free 7 days, Starter 30 days, Pro 180 days, Growth 365 days, Enterprise lifetime.
limitsin every answer says the window (historyDays,earliest).GET /links/:id/statsand the clicks endpoints keep the whole history. - On Free, unique visitors, cities and UTM breakdowns are Starter and above:
uniqueVisitorsisnull,lockedsays what is withheld, andcityisnullwithcityLocked: trueon each click. - A click counts toward its link's current folder; deleted links' clicks are left out. Crawlers and link-preview fetchers count. Unique visitors are an approximation (distinct addresses); no address is ever returned.
- Every answer is
Cache-Control: private, no-store. - A workspace key without
folderIdreads the whole workspace, which is slower; passfolderIdorlinkIdwhen you can. API keys share analytics capacity with the dashboard and get a smaller share of it, counted on each API server: one request of a workspace's keys runs at a time and two across all keys, and at most 2 more of a workspace's keys (10 across all keys) wait in line for up to 3 seconds; beyond that a request is refused at once. Send analytics requests one after another, never in parallel, and on a 503analytics_unavailablewait theRetry-Afterseconds before retrying. - A row's
keyis the value (nullfor unknown);linkrows addlink,citykeys are{ country, city },referrerkeys{ kind, host, source, label }.sparkhas one count per hour or day of the range.restClicksis the clicks of the rows pastlimit.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A parameter breaks a rule (a date that doesn't exist, to before from, an unknown tz); issues says which. |
| 400 | range_outside_history | from is before the plan's history window. The body adds historyDays and earliest. |
| 403 | plan_upgrade_required | dimension=city or utm on Free (feature: "advanced_analytics", requiredPlan: "pro"). |
| 404 | project_not_found | folderId isn't a folder of the workspace, or isn't a folder-level key's own folder. |
| 404 | link_not_found | linkId isn't a link in the key's scope. |
| 503 | analytics_unavailable | Too busy or too slow just now. Retry after Retry-After seconds. |
cURL
curl "https://api.sendurl.to/api/v1/analytics/breakdown?from=2026-10-12&to=2026-10-14&dimension=country&limit=2" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"dimension": "country",
"order": "desc",
"range": {
"from": "2026-10-12",
"to": "2026-10-14",
"tz": "UTC",
"days": 3,
"granularity": "day",
"start": "2026-10-12T00:00:00.000Z",
"end": "2026-10-15T00:00:00.000Z"
},
"previous": {
"start": "2026-10-09T00:00:00.000Z",
"end": "2026-10-12T00:00:00.000Z"
},
"limits": {
"historyDays": 90,
"earliest": "2026-07-16"
},
"rows": [
{
"key": "IN",
"clicks": 22,
"uniqueVisitors": 16,
"share": 0.524,
"previousClicks": 18,
"change": 0.222,
"spark": [
7,
10,
5
]
},
{
"key": "US",
"clicks": 15,
"uniqueVisitors": 11,
"share": 0.357,
"previousClicks": 12,
"change": 0.25,
"spark": [
5,
6,
4
]
}
],
"rowCount": 3,
"total": {
"clicks": 42,
"uniqueVisitors": 31
},
"restClicks": 5,
"locked": {
"uniqueVisitors": false,
"city": false,
"utm": false
}
}Analytics
Analytics clicks
GET/api/
The clicks of a date range across every link in scope, newest first, one page at a time. For one link's whole history, use GET /links/:id/clicks.
AccessAny API key, over the folder or workspace it reaches: a folder-level key reads its own folder only.
Permission (scope)analytics:read
Query parameters
- fromdateRequired
- First day,
YYYY-MM-DD, intz. Not before the plan's history window (limits.earliest): else 400range_outside_history. - todateRequired
- Last day, inclusive,
YYYY-MM-DD, intz. Not beforefrom; tomorrow is answered as today, later is 400. - tzstringOptional
- The time zone days are counted in:
UTC(default) or an IANA name such asEurope/Berlin.range.tzechoes the name used. - folderIduuidOptional
- Only this folder's links. Without it, a workspace key reads the whole workspace and a folder-level key its own folder; another folder is 404
project_not_found. - projectIduuidOptional
- Deprecated: the old name of
folderId. - linkIduuidOptional
- Only this link (in
folderIdwhen both are given). A link outside the key's scope is 404link_not_found. - limitintegerOptional
- Page size, 1 to 10. Default 10.
- cursorstringOptional
pagination.nextCursorfrom the previous page. Leave it out for the first page.
Response
200 OK. On Pro.
- Analytics keep today and the days before it that the plan allows: Free 7 days, Starter 30 days, Pro 180 days, Growth 365 days, Enterprise lifetime.
limitsin every answer says the window (historyDays,earliest).GET /links/:id/statsand the clicks endpoints keep the whole history. - On Free, unique visitors, cities and UTM breakdowns are Starter and above:
uniqueVisitorsisnull,lockedsays what is withheld, andcityisnullwithcityLocked: trueon each click. - A click counts toward its link's current folder; deleted links' clicks are left out. Crawlers and link-preview fetchers count. Unique visitors are an approximation (distinct addresses); no address is ever returned.
- Every answer is
Cache-Control: private, no-store. - A workspace key without
folderIdreads the whole workspace, which is slower; passfolderIdorlinkIdwhen you can. API keys share analytics capacity with the dashboard and get a smaller share of it, counted on each API server: one request of a workspace's keys runs at a time and two across all keys, and at most 2 more of a workspace's keys (10 across all keys) wait in line for up to 3 seconds; beyond that a request is refused at once. Send analytics requests one after another, never in parallel, and on a 503analytics_unavailablewait theRetry-Afterseconds before retrying. - Each click is
{ id, linkId, slug, shortUrl, clickedAt, country, city, cityLocked, device, browser, os, referrer };referreris the referring site ({ kind, host, source, label }), never the full referring URL.pagination.totalis on the first page only.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A parameter breaks a rule (a date that doesn't exist, to before from, an unknown tz, limit outside 1–10, a cursor this API didn't issue); issues says which. |
| 400 | range_outside_history | from is before the plan's history window. The body adds historyDays and earliest. |
| 404 | project_not_found | folderId isn't a folder of the workspace, or isn't a folder-level key's own folder. |
| 404 | link_not_found | linkId isn't a link in the key's scope. |
| 503 | analytics_unavailable | Too busy or too slow just now. Retry after Retry-After seconds. |
cURL
curl "https://api.sendurl.to/api/v1/analytics/clicks?from=2026-10-12&to=2026-10-14&limit=1" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"clicks": [
{
"id": "a4c6e8f0-1b3d-4e5f-9a7b-2c4d6e8f0a1b",
"linkId": "5d8f2a1c-7b3e-4c9d-a0e1-6f2b8c4d1e7a",
"slug": "x7Kp2",
"shortUrl": "https://snu.to/x7Kp2",
"clickedAt": "2026-10-14T08:03:11.482Z",
"country": "IN",
"city": "Bengaluru",
"cityLocked": false,
"device": "mobile",
"browser": "Chrome",
"os": "Android",
"referrer": {
"kind": "host",
"host": "instagram.com",
"source": "instagram",
"label": "Instagram"
}
}
],
"pagination": {
"limit": 1,
"nextCursor": "WyIyMDI2LTEwLTE0VDA4OjAzOjExLjQ4MjkxM1oiLCJhNGM2ZThmMC0xYjNkLTRlNWYtOWE3Yi0yYzRkNmU4ZjBhMWIiXQ",
"hasMore": true,
"total": 42
}
}Domains
List domains
GET/api/
The workspace's custom domains (go.yourbrand.com) and subdomains on snu.to (yourbrand.snu.to), newest first, one page at a time, with how many of each the plan allows. Removed domains are left out.
Adding, verifying and removing a domain is done in the console, by the workspace's owners and admins; those endpoints answer an API key with 403 session_required.
AccessAny API key. A folder-level key sees the workspace's domains: it needs their ids for POST /links.
Permission (scope)workspace:read
Query parameters
- limitintegerOptional
- Page size, 1 to 10. Default 10.
- cursorstringOptional
pagination.nextCursorfrom the previous page. Leave it out for the first page.
Response
200 OK. Domain objects, the workspace's usage, and pagination with total.
statusisactive(links on it open),pending(waiting for the DNS records or the HTTPS certificate) orfailed(cloudflare.messagesays what to fix). Only an active domain takes new links.dnsis set for custom domains: the CNAME and TXT records to create.dns.txt.valueis alwaysnullfor an API key; the workspace's owners and admins see it in the console.dns.txt.verifiedsays whether the TXT record was found.usagecounts each type separately against the plan's limit. After a move to a smaller planusedcan be abovelimit: existing domains keep working, and no new one of that type can be added.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | limit outside 1–10, a cursor this API didn't issue, or offset sent. |
| 503 | domains_unavailable | Domains are switched off for now. Retry later. |
cURL
curl "https://api.sendurl.to/api/v1/domains" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"domains": [
{
"id": "d3f5b7c9-e1a3-4b5d-8f7a-9b1c3d5e7f9a",
"type": "custom",
"hostname": "go.yourbrand.com",
"hostnameUnicode": "go.yourbrand.com",
"status": "pending",
"linksCount": 0,
"createdAt": "2026-10-27T09:04:51.027Z",
"verifiedAt": null,
"checkedAt": "2026-10-27T09:05:58.614Z",
"dns": {
"cname": {
"name": "go.yourbrand.com",
"target": "snu.to"
},
"txt": {
"name": "_sendurl.go.yourbrand.com",
"value": null,
"verified": false
},
"advice": "If your DNS is on Cloudflare, set the CNAME to DNS only (grey cloud)."
},
"cloudflare": {
"status": null,
"sslStatus": null,
"message": "Waiting for the TXT record"
}
},
{
"id": "c2e4a6b8-d0f2-4a4c-9e6f-8a0b2c4d6e8f",
"type": "subdomain",
"hostname": "yourbrand.snu.to",
"hostnameUnicode": "yourbrand.snu.to",
"status": "active",
"linksCount": 4,
"createdAt": "2026-10-27T09:00:12.381Z",
"verifiedAt": "2026-10-27T09:00:12.381Z",
"checkedAt": null,
"dns": null,
"cloudflare": null
}
],
"usage": {
"subdomains": {
"used": 1,
"limit": 1
},
"customDomains": {
"used": 1,
"limit": 1
}
},
"subdomainParent": "snu.to",
"cnameTarget": "snu.to",
"pagination": {
"limit": 10,
"nextCursor": null,
"hasMore": false,
"total": 2
}
}Domains
Retrieve a domain
GET/api/
One domain of the workspace, with its DNS records and status.
AccessAny API key.
Permission (scope)workspace:read
Path parameters
- iduuidRequired
- The domain's
id. Anything that isn't a live domain of the key's workspace is 404domain_not_found.
Response
200 OK. A domain object.
Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | domain_not_found | No such domain in the key's workspace, or it was removed. |
| 503 | domains_unavailable | Domains are switched off for now. Retry later. |
cURL
curl "https://api.sendurl.to/api/v1/domains/c2e4a6b8-d0f2-4a4c-9e6f-8a0b2c4d6e8f" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"id": "c2e4a6b8-d0f2-4a4c-9e6f-8a0b2c4d6e8f",
"type": "subdomain",
"hostname": "yourbrand.snu.to",
"hostnameUnicode": "yourbrand.snu.to",
"status": "active",
"linksCount": 4,
"createdAt": "2026-10-27T09:00:12.381Z",
"verifiedAt": "2026-10-27T09:00:12.381Z",
"checkedAt": null,
"dns": null,
"cloudflare": null
}Workspace
List folders
GET/api/
The workspace's folders: Default first, then by name (ignoring case), each with its link count.
AccessWorkspace keys only. A folder-level key gets 403 project_key_forbidden.
Permission (scope)workspace:read
Query parameters
- limitintegerOptional
- Page size, 1 to 10. Default 10.
- cursorstringOptional
pagination.nextCursorfrom the previous page. Leave it out for the first page.
Response
200 OK. Folder objects and pagination with total (projects, the same items, left out here).
GET /projectsis the deprecated old path of this endpoint: same answer.- The body also carries
projects, the same items under their old name (deprecated). Readfolders.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | limit outside 1–10, a cursor this API didn't issue, or offset sent. |
| 403 | project_key_forbidden | Called with a folder-level key. |
cURL
curl "https://api.sendurl.to/api/v1/folders" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"folders": [
{
"id": "3f6a1d2c-8e4b-4f7a-9c0d-1b2e3a4f5c6d",
"name": "Default",
"isDefault": true,
"linksCount": 9,
"createdAt": "2026-09-02T14:21:07.315Z",
"updatedAt": "2026-09-02T14:21:07.315Z"
},
{
"id": "7c1e5a9b-2d4f-4e6a-8b3c-0f9d1e2a3b4c",
"name": "Marketing",
"isDefault": false,
"linksCount": 3,
"createdAt": "2026-10-01T10:00:00.000Z",
"updatedAt": "2026-10-01T10:00:00.000Z"
}
],
"pagination": {
"limit": 10,
"nextCursor": null,
"hasMore": false,
"total": 2
}
}Workspace
Create a folder
POST/api/
Adds a folder to the workspace, up to its plan's limit (3 on Free, 5 on Starter, 25 on Pro, 100 on Growth and no limit on Enterprise, the Default folder included). Folders can't be deleted or renamed through the API; renaming is in the console.
AccessWorkspace keys only. A folder-level key gets 403 project_key_forbidden.
Permission (scope)folders:write
Body parameters
- namestringRequired
- 1–100 characters after trimming spaces. Unique in the workspace, ignoring case.
Response
201 Created. The new folder.
POST /projectsis the deprecated old path of this endpoint: same answer.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A field breaks a rule; issues says which. |
| 403 | project_key_forbidden | Called with a folder-level key. |
| 403 | project_limit_reached | The workspace already has as many folders as its plan allows. |
| 409 | project_name_taken | A folder with that name (in any letter case) exists. |
cURL
curl -X POST "https://api.sendurl.to/api/v1/folders" \
-H "Authorization: Bearer $SENDURL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing"
}'{
"id": "7c1e5a9b-2d4f-4e6a-8b3c-0f9d1e2a3b4c",
"name": "Marketing",
"isDefault": false,
"linksCount": 0,
"createdAt": "2026-10-01T10:00:00.000Z",
"updatedAt": "2026-10-01T10:00:00.000Z"
}Workspace
Check your key
GET/api/
Who the key is: its workspace, its folder (null for a workspace key; project is the same, deprecated), the plan, how many links the workspace uses, and how many of them have used half or all of their click limit. A cheap way to test a key.
AccessAny API key.
Permission (scope)workspace:read
Response
200 OK. role is always null for a key. keyPrefix is the key's first 12 characters, never the key. The usage counts cover the whole workspace, even for a folder-level key. linksUsed counts every link, disabled and expired ones included. linksAtVisitLimit counts active, unexpired links whose clicks reached their limit (they answer 410); linksOverHalfVisitLimit counts active, unexpired links that have used half their clicks or more, those at the limit included.
Errors
Only the 401s every request can get.
cURL
curl "https://api.sendurl.to/api/v1/me" \
-H "Authorization: Bearer $SENDURL_API_KEY"{
"via": "key",
"org": {
"id": "9b2e4c1a-5f3d-4e8b-a1c7-2d6f8e0b3a95",
"name": "Acme's workspace"
},
"role": null,
"folder": null,
"project": null,
"plan": {
"name": "Free",
"linksLimit": 25,
"visitsLimitPerLink": null,
"subdomainsLimit": 1,
"customDomainsLimit": 1
},
"usage": {
"linksUsed": 12,
"linksAtVisitLimit": 0,
"linksOverHalfVisitLimit": 1
},
"key": {
"id": "b7d9f1a3-c5e7-4f9a-8b1c-3d5e7f9a1b2c",
"name": "Production",
"keyPrefix": "snu_XXXXXXXX",
"expiresAt": null
}
}Reference
The link object
GET /links/:id returns every field below. Create and update return all but totalClicks and qrScans; list rows leave out updatedAt, guestToken and qrScans. Timestamps are ISO 8601 in UTC.
| Field | Type | Description |
|---|---|---|
| id | uuid | The link's id. |
| slug | string | The path of the short URL. |
| shortUrl | string | The short URL to share, e.g. https://snu.to/launch, or https://go.yourbrand.com/launch on a domain. |
| qrUrl | string | What the link's QR code encodes: shortUrl plus ?q. Visits through it are recorded with source: "qr". |
| destinationUrl | string | Where the short URL redirects (HTTP 302). |
| iosUrl | string | null | Where iPhone and iPad visitors go instead of destinationUrl. null: the destination. Bots and tablets that show desktop websites always get the destination. |
| androidUrl | string | null | Where Android visitors go instead of destinationUrl. null: the destination. Bots and tablets that show desktop websites always get the destination. |
| title | string | null | The link's label. |
| tags | object[] | The link's tags by name: [{ id, name, color }] (color a palette name: gray, red, orange, amber, green, teal, blue, purple, pink). []: none. |
| qrStyle | object | null | The QR code's design ({ v: 2, fg, bg, dots, corners, cornerColor, gradient, logo, frame }), or null for the plain code. Either way the code encodes qrUrl. |
| preview | object | null | The custom preview apps show when the short URL is shared: { v: 1, title, description, image } (description and image may be null), or null for none (apps show the destination's own). People who open the link are redirected as usual. |
| abTest | object | null | The link's running A/B test, { v: 1, variants: [{ id, url, weight }], startedAt }, or null for none: people are split between the variants' URLs by weight and keep their variant for 30 days. |
| geoTargets | object | null | The link's country rules, { rules: [{ id, countries, url }] }, or null for none: visitors from a rule's countries (two-letter ISO codes) go to its url, everyone else and unknown countries to destinationUrl. Each rule's id stays the same when the rules are edited, and is never reused. Pro and above. |
| active | boolean | false: switched off; the short URL answers 404 (a link disabled by moderation answers 410 instead: moderated). |
| limitDisabled | boolean | true when a refund or chargeback cancelled the workspace's plan and SendURL switched the link off to bring it within the new plan's active-link limit. Switching it on clears it; while the workspace is at that limit, switching it on is refused with 403 link_limit_reached. |
| moderated | boolean | true when SendURL disabled the link: after an abuse report, or when a threat-intelligence service lists one of its URLs, usually within seconds of a create or edit, and at the latest the next time we check all links (active is then false). Its short URL answers 410 with a page saying the link was taken down, and records no clicks. It can't be re-enabled or deleted. |
| expiresAt | string | null | UTC expiry. From then on the short URL answers 410 and records no clicks. null: never. |
| passwordProtected | boolean | Whether visitors must enter a password. The password itself is never sent to an API key. |
| visitsCount | integer | Clicks counted so far. Clicks past your plan's monthly tracked-click limit are not counted. |
| visitsLimit | integer | null | Always null: no plan has a per-link visit limit. Kept for older clients. |
| folderId | uuid | The folder the link belongs to. |
| projectId | uuid | Deprecated: the old name of folderId, always the same value. |
| orgId | uuid | The workspace that owns the link. |
| domainId | uuid | null | The domain the link is on (GET /domains), or null for snu.to. Set when the link is created; it never changes. |
| domain | object | null | { id, hostname, removed, active } of that domain, null on snu.to. removed: true once the domain was removed: the link stays listed, but its short URL no longer opens. active: true only while the domain is in place and active; a custom domain whose DNS records or certificate stopped checking out is active: false (not removed), and its links don't open until it is active again. |
| userId | uuid | null | Who created it: the signed-in user, or the API key's creator. |
| guestToken | null | Always null for links in a workspace. |
| createdAt | string | ISO 8601, UTC. |
| updatedAt | string | ISO 8601, UTC. |
| totalClicks | integer | All clicks. In list rows and GET /links/:id. |
| qrScans | integer | Clicks through the QR code. GET /links/:id only. |
What the short URL does
- Redirects with a 302 while the link is active and not expired, and records a click.
- Answers a 404 page when the link is switched off (
active: false), a 410 page once it has expired. Neither records a click. - With a password, shows a password page first; only the right password redirects and records the click.
?qon the short URL (qrUrl) marks the visit as a QR scan. It is not passed on to the destination.- On a domain that was removed (
domain.removed), or that isn't active, the short URL answers the 404 page and records no click.
Reference
The click object
One visit of the short URL that was redirected. Device, browser, engine and OS fields are parsed from the user agent and are null when it doesn't say.
| Field | Type | Description |
|---|---|---|
| id | uuid | The click's id. |
| linkId | uuid | The link that was visited. |
| clickedAt | string | ISO 8601, UTC. |
| source | string | null | "qr" when the visit came through the QR code (?q), else null. |
| variant | string | null | The A/B test variant the visit was sent to (a–d), null for a link without a test, an app link or a bot. |
| geoRule | number | null | The id of the link's country rule that sent the visit to its URL, null when no rule matched. |
| country | string | null | Two-letter ISO 3166-1 country code from Cloudflare's geolocation (T1 for Tor), null when unknown. |
| city | string | null | The visitor's city, as Cloudflare estimates it; null when unknown and for older clicks. Always null on Free: Starter and above shows it. |
| cityLocked | boolean | true when the workspace's plan doesn't show cities (Free), so city is null whatever was recorded; false on Starter and above. |
| referer | string | null | The visitor's Referer header, if the browser sent one. |
| userAgent | string | null | The visitor's User-Agent header. |
| device | string | null | Device type parsed from the user agent: desktop, mobile, tablet, … |
| deviceVendor, deviceModel | string | null | e.g. Apple, iPhone. |
| browser, browserVersion, browserMajor, browserType | string | null | e.g. Chrome, 141.0.0.0, 141. |
| engineName, engineVersion | string | null | Rendering engine, e.g. Blink. |
| os, osVersion | string | null | e.g. Android, 15. |
| cpuArchitecture | string | null | When the user agent says, e.g. amd64. |
Reference
The domain object
A custom domain or a subdomain on snu.to, as GET /domains and GET /domains/:id return it. A link on it has the domain's id as domainId.
| Field | Type | Description |
|---|---|---|
| id | uuid | The domain's id: domainId on POST /links. |
| type | string | subdomain (a name on snu.to) or custom (your own domain). |
| hostname | string | The name links use, lower case, e.g. go.yourbrand.com. An internationalised name is in its ASCII (xn--) form. |
| hostnameUnicode | string | The same name as people read it. |
| status | string | active, pending or failed. Only an active domain takes new links and opens them. |
| linksCount | integer | Links on the domain, deleted ones left out. |
| createdAt | string | ISO 8601, UTC. |
| verifiedAt | string | null | When the domain first turned active; null before. |
| checkedAt | string | null | When the DNS records and the certificate were last checked (custom domains). |
| dns | object | null | Custom domains: { cname: { name, target }, txt: { name, value, verified }, advice }, the two records to create and a sentence to show with them (advice: the Cloudflare DNS-only tip). txt.value is null for an API key. null for a subdomain. |
| cloudflare | object | null | Custom domains: { status, sslStatus, message }, the hostname's and the certificate's state at our edge (both null until the TXT record matches: no hostname is set up before that), and in message what to do next. null for a subdomain. |
Reference
Pagination
Every list (GET /links, GET /links/:id/clicks, GET /domains, GET /folders) is cursor-paginated, at most 10 items per page. Pass pagination.nextCursor back as cursor until hasMore is false. The CSV export (GET /links/export.csv) is not a page: it streams every matching row.
Query parameters
- limitintegerOptional
- 1 to 10, default 10. Anything else (
0,11,1.5,abc) is 400validation_error. - cursorstringOptional
- Opaque: use it as given. A cursor this API didn't issue is 400
validation_error.
The pagination object
- limit
- The page size used.
- nextCursor
- The next page's
cursor, ornullon the last page. - hasMore
- Whether another page follows.
- total
- Items in scope, on links and folders. Clicks have no
total;GET /links/:idhastotalClicks.
- Pages don't shift when links or clicks are added in between: the cursor marks a position, not a count. The exception is
GET /linkswithsort=clicks_descorclicks_asc: a link's click count changes with every visit, so a link clicked between two pages can be skipped or repeated. Dedupe byid. offsetis not supported and is refused with 400validation_error. Other unknown parameters are ignored.
cURL · next page
curl "https://api.sendurl.to/api/v1/links?limit=2&cursor=WyIyMDI2LTEwLTEzVDA5OjEyOjQ0LjEyMzQ1NloiLCI1ZDhmMmExYy03YjNlLTRjOWQtYTBlMS02ZjJiOGM0ZDFlN2EiXQ" \
-H "Authorization: Bearer $SENDURL_API_KEY"Reference
Errors
Errors have a non-2xx status and one JSON shape: error, a stable code to branch on; message, a sentence for people that may be reworded; and, on validation_error only, issues, the list of what failed, each with a path naming the field. Some codes add fields of their own: link_limit_reached carries limit and current, insufficient_scope carries requiredScope.
{
"error": "validation_error",
"message": "Invalid request",
"issues": [
{
"validation": "url",
"code": "invalid_string",
"message": "Invalid url",
"path": [
"destinationUrl"
]
},
{
"validation": "regex",
"code": "invalid_string",
"message": "Slug must be 1-256 characters: letters, digits, '-' or '_'",
"path": [
"slug"
]
}
]
}{
"error": "validation_error",
"message": "Expiry must be in the future",
"issues": [
{
"code": "custom",
"path": [
"expiresAt"
],
"message": "Expiry must be in the future"
}
]
}{
"error": "link_limit_reached",
"message": "You have reached the maximum of 25 links on the Free plan.",
"limit": 25,
"current": 25
}| Status | Code | Meaning |
|---|---|---|
| 400 | validation_error | A body field, query parameter or cursor breaks a rule. issues lists them. |
| 400 | invalid_json | The body isn't valid JSON. |
| 400 | bad_request | The request couldn't be read, e.g. a body cut short. The status is the one that fits: 400, or 415 for an unsupported charset or Content-Encoding. |
| 400 | range_outside_history | An analytics from before the plan's history window. The body adds historyDays and earliest. |
| 401 | missing_token | No Authorization: Bearer … header. |
| 401 | invalid_token | The Bearer token is neither an API key (snu_…) nor a valid console session. |
| 401 | invalid_api_key | An snu_ key that isn't valid. message: “Invalid API key” (malformed or unknown), “This API key was revoked” or “This API key has expired”. |
| 403 | session_required | A console-only endpoint: API key management, listing workspaces (GET /orgs), renaming folders or the workspace, adding, verifying or removing a domain, profile, reports. |
| 403 | insufficient_scope | The key wasn't given the permission (scope) this endpoint needs. requiredScope names it. Create a key with that permission, or with Full access. |
| 403 | project_forbidden | A folder-level key named another folder in a write. |
| 403 | project_key_forbidden | A folder-level key called /folders (or /projects). |
| 403 | link_limit_reached | The workspace has used all its plan's links. |
| 403 | project_limit_reached | The workspace has as many folders as its plan allows. |
| 403 | plan_upgrade_required | A feature your plan doesn't include: deleting a link on Free, changing a link's destination after creating it on Free, or a Starter or Pro feature (the body names it in feature and the lowest plan that has it in requiredPlan). |
| 403 | link_moderated | Re-enabling or deleting a link disabled by moderation. |
| 404 | link_not_found | No such link in the key's scope. |
| 404 | click_not_found | No such click on that link. |
| 404 | project_not_found | No such folder in the workspace (or the key's scope). |
| 404 | domain_not_found | No such domain in the workspace, or it was removed. |
| 404 | not_found | No such endpoint. |
| 409 | slug_taken | The custom back-half is in use on that domain, or (rarely) a random slug collided: retry. |
| 409 | project_name_taken | A folder with that name exists. |
| 409 | domain_not_active | Creating a link on a domain that isn't active yet. |
| 413 | payload_too_large | The body is too large. |
| 422 | unsafe_destination | Creating or editing a link whose URL one of our own rules flags as unsafe. The body adds field, provider and threatType. A URL a threat-intelligence service lists is not refused: the link is saved and taken down, usually within seconds, and at the latest the next time we check all links (moderated: true, active: false). |
| 422 | too_many_urls | Creating or editing a link so it holds more than 15 web URLs in total (its destinations plus the web URLs inside them, each counted once), or with one URL over its own limits (more than 8 web URLs in one address, nested too deep, or too complex to check). The body adds limit, current and reason (link, urls, depth or work), and field and fieldLimit for one URL over its own limits; the message names the limit. |
| 429 | domain_rate_limited | Adding a domain in the console after 5 were added in the last hour (removed ones count). Retry after retryAfterSeconds (also sent as Retry-After). Adding domains is console-only, so an API key never gets it. |
| 500 | internal_error | Something failed on our side. |
| 503 | service_unavailable | We couldn't check the key just now. Retry. |
| 503 | analytics_unavailable | Analytics are too busy or too slow just now. Retry after Retry-After seconds. |
| 503 | export_unavailable | An export is already running (one per workspace, a few per server). Retry after retryAfterSeconds (also sent as Retry-After). |
| 503 | domains_unavailable | Domains are switched off for now. Retry later. |
Reference
Rate limits
There is no per-key limit (the MCP server has its own, above). Cloudflare, in front of the API, allows 50 requests per 10 seconds from one IP address; past that it answers 429 for 10 seconds. That response comes from Cloudflare, not the API, so it isn't in the JSON error shape. Wait and retry with backoff.