Skip to main content
SendURL, home

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
POST /api/v1/links
$ 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,
  … }
Sample request and response

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.

The main routes of the SendURL REST API
RouteWhat it does
POST /linksCreate a link: a random or custom slug, in the folder you choose
GET /linksList links, filtered by folder, status, tags or a search
GET /links/:idOne link, with its click total and QR scans
PATCH /links/:idUpdate a link, switch it off or on, move it to another folder
GET /links/:id/clicksA link's clicks, one by one, newest first
GET /links/:id/statsA link's clicks per day
GET /links/export.csvEvery link in scope as one CSV file
GET /foldersList your folders (a workspace key)
POST /foldersCreate a folder (a workspace key)
GET /meThe 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.

GET /api/v1/links/:id/clicks
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 } }
Sample data

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.

  1. Sign up free

    Open API keys in the console and choose New key.

  2. Choose its reach

    All folders, for your whole workspace, or one folder, so the key reaches only that folder's links.

  3. Send it as a Bearer token

    In the Authorization header, 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.nextCursor back as cursor for 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 on error. 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.

What the SendURL API does on Free and on Pro and above
FreePro and above
API keys, workspace or folderYesYes
Create, list and read links; read clicksYes, up to 25 linksYes, up to the plan's link limit (1,000 on Pro)
Switch a link off and onYesYes
Set an expiry or a passwordNo (403)Yes
Change a destinationNo (403)Yes
Delete a linkNo (403)Yes
Past Free's limits on custom previews, styled QR codes and A/B testsNo (403)Yes
A click's cityWithheldYes

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.

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.