On every plan · REST and JSON · Bearer keys
URL shortener API: create short links and read clicks from your code
The SendURL URL shortener API creates short links and reads their clicks from your own code: one HTTPS request with a Bearer key, a JSON answer. Each link gets a random or custom slug and a QR address, and each click comes back with its country, device and referrer. API keys come with every plan, the Free plan too.
- No SDK to install
- Workspace or folder keys
- Cursor pagination
$ curl https://api.sendurl.to/api/v1/links \
-H "Authorization: Bearer $SENDURL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"destinationUrl":"https://yoursite.com/launch"}'201 Created
{ "slug": "x7Kp2",
"destinationUrl": "https://yoursite.com/launch",
"shortUrl": "https://snu.to/x7Kp2",
"qrUrl": "https://snu.to/x7Kp2?q",
"folderId": "…",
"visitsCount": 0,
… }What the URL shortener API can do
The URL shortener API creates, lists, updates and switches off links, reads each link's clicks one by one and per day, and lists and creates folders. Every call goes to https://api.sendurl.to/api/v1, and each one is in the API docs with its fields, errors and a curl example.
| Route | What it does |
|---|---|
| POST /links | Create a link: a random or custom slug, in the folder you choose |
| GET /links | List links, filtered by folder, status, tags or a search |
| GET /links/:id | One link, with its click total and QR scans |
| PATCH /links/:id | Update a link, switch it off or on, move it to another folder |
| GET /links/:id/clicks | A link's clicks, one by one, newest first |
| GET /links/:id/stats | A link's clicks per day |
| GET /links/export.csv | Every link in scope as one CSV file |
| GET /folders | List your folders (a workspace key) |
| POST /folders | Create a folder (a workspace key) |
| GET /me | The key's workspace, plan and usage |
Read every click. Each click comes with its time, country, device, browser, operating system and referrer, and whether it was a QR scan (source: "qr"). Every link carries its qrUrl, and GET /links/:id returns qrScans.
The API returns clicks for the link's whole history, whatever the plan. On Free, a click's city is withheld (city: null, cityLocked: true). More on the console's side of this in Link Tracking.
Folders. Send folderId on POST /links to create a link in a folder, or as a filter on GET /links. Older scripts that use /projects and projectId keep working: they are the same folders under their old name. More in folders and tags.
200 OK
{ "clicks": [
{ "country": "US", "device": "mobile",
"browser": "Mobile Safari", "os": "iOS",
"referer": "https://www.instagram.com/",
"source": null,
"clickedAt": "2026-11-12T14:03:11.482Z", … },
…
],
"pagination": { "limit": 10, "nextCursor": "…", "hasMore": true } }How do I get an API key?
Sign up free, open API keys in the console, choose New key and pick its reach, the whole workspace or one folder, then send it as a Bearer token. A workspace can have up to 25 active keys; a revoked key stops working on the next request.
Sign up free
Open API keys in the console and choose New key.
Choose its reach
All folders, for your whole workspace, or one folder, so the key reaches only that folder's links.
Send it as a Bearer token
In the
Authorizationheader, over HTTPS only. Keep it on your server, never in code that runs in a browser.
What to know before you build
- Pagination
Lists come 10 at a time
Pass
pagination.nextCursorback ascursorfor the next page. The API docs cover the details. - Errors
Errors are JSON with a code
For example
{ "error": "slug_taken", "message": "That slug is already taken — try another." }. Branch onerror. Every code is in the API docs. - Folder keys
A folder key sees only its folder
Links in other folders answer 404, and it cannot list folders. Use one per client or project.
- Secrets
A key never sees a password
Links carry passwordProtected, never the password. A key cannot create, list or revoke keys.
- Limits
The plan's limits apply
The link limit counts the whole workspace: 25 links on Free, 1,000 on Pro. Over it, a create is 403 link_limit_reached.
- No SDK
Nothing to install
Any language that can send an HTTPS request works. Slugs are 1 to 256 letters, digits, - or _.
The API by plan
A key follows its workspace's plan. A call for a feature the plan lacks, or past Free's allowance of custom previews, styled QR codes or A/B tests, answers 403 plan_upgrade_required with a message that says why. A create past the link limit answers 403 link_limit_reached, and one past the folder limit 403 project_limit_reached.
| Free | Pro and above | |
|---|---|---|
| API keys, workspace or folder | Yes | Yes |
| Create, list and read links; read clicks | Yes, up to 25 links | Yes, up to the plan's link limit (1,000 on Pro) |
| Switch a link off and on | Yes | Yes |
| Set an expiry or a password | No (403) | Yes |
| Change a destination | No (403) | Yes |
| Delete a link | No (403) | Yes |
| Past Free's limits on custom previews, styled QR codes and A/B tests | No (403) | Yes |
| A click's city | Withheld | Yes |
Every plan side by side: Pricing.
URL shortener API: questions and answers
Still curious? Email hi@sendurl.to and a human will reply.
Yes. Every plan includes API keys, the Free plan too, and the Free plan's 25 links can all be made through the API. On Free, requests that set an expiry or a password, change a destination or delete a link answer 403 plan_upgrade_required, as do those past Free's limits on custom previews, styled QR codes and A/B tests.
Yes. GET /links/:id/clicks returns each click, 10 at a time with a cursor for the next page, with its time, country, device, browser, operating system and referrer. GET /links/:id/stats returns the link's clicks per day. On Free, a click's city is withheld.
Send one request per link. The URL shortener API in Python guide has a script that reads a CSV file and creates a link for each row.
Yes, through the API: page through GET /links/:id/clicks and write each click to a file. The CSV export, in the console and at GET /links/export.csv, covers links, not clicks.
A workspace key reaches every link in every folder of your workspace. A folder key reaches only the links of one folder: it creates links there, lists only those and gets a 404 for anything else. Use one folder key per client or script.
No. There is no package to install. Any language that can send an HTTPS request with a header works; the docs show each call with curl, and the guides add Python and JavaScript.
Guides and tools for the API
- Free URL shortener API: keys, endpoints and pagination Make a key, choose workspace or folder access and page through results.
- URL shortener API in Python Create links in bulk from a CSV, page through clicks, export them.
- Folder-level API keys What a key limited to one folder can and cannot reach.
- An API acceptance checklist What to test before a script goes live against the API.
- Bulk UTM builder Tag a list of links and shorten them all with your own key.
- Folders and tags Keep each client's links in a folder, with a key for that folder only.
Make your first API request
Create a key in the console and send the request at the top of this page. Free on every plan.
No card needed.