Aller au contenu

Short links

Every route for short links, each with a request example and the response returned. A link is referred to by its id or by its custom address (slug).

List short links

GET/v1/links

The environment's short links, newest first. Read scope.

  • ?search= — searches the destination, the custom address and the id
  • ?tag= — a tag id: only the links that carry it
  • ?page= and ?per_page= — pagination, 50 per page by default, 100 at most
curl "https://api.tinylink.fr/v1/links?search=promo" \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "data": [
    {
      "id": "6ac401093831b",
      "type": "link",
      "target_url": "https://example.com/promo",
      "slug": "promo",
      "url": "https://tnlnk.fr/promo",
      "status": "active",
      "password_protected": false,
      "restricted": false,
      "tags": [],
      "qr_code": null,
      "created_at": "2026-10-05T21:56:57+02:00",
      "edit_url": "https://app.tinylink.fr/shortener-edit?id=6ac401093831b"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total": 1,
    "total_pages": 1
  }
}

Shorten an address

POST/v1/links

url is required: a web address, an e-mail or a phone number. The response is the link created; in it, url is the short address and target_url the destination. Write scope.

  • url — the destination, 500 characters at most
  • slug — the custom address: letters, digits, -, _ and ., 40 characters at most
  • password — protects the link with a password
  • tags — a list of tag ids from the environment
  • qr_code — true for the classic QR code, "none" without a logo, or a template id
curl -X POST https://api.tinylink.fr/v1/links \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/promo",
    "slug": "promo",
    "qr_code": "none"
  }'

Possible responses

{
  "id": "6ac401093831b",
  "type": "link",
  "target_url": "https://example.com/promo",
  "slug": "promo",
  "url": "https://tnlnk.fr/promo",
  "status": "active",
  "password_protected": false,
  "restricted": false,
  "tags": [],
  "qr_code": {
    "png": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.png",
    "svg": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.svg",
    "template": "none",
    "shape": "square",
    "encoded_url": "https://tnlnk.fr/6ac401093831b&qr"
  },
  "created_at": "2026-10-05T21:56:57+02:00",
  "edit_url": "https://app.tinylink.fr/shortener-edit?id=6ac401093831b"
}

Read a short link

GET/v1/links/{id}

status is active, pending_review (being checked, the link does not redirect yet) or blocked. Read scope.

curl https://api.tinylink.fr/v1/links/promo \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "id": "6ac401093831b",
  "type": "link",
  "target_url": "https://example.com/promo",
  "slug": "promo",
  "url": "https://tnlnk.fr/promo",
  "status": "active",
  "password_protected": false,
  "restricted": false,
  "tags": [],
  "qr_code": {
    "png": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.png",
    "svg": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.svg",
    "template": "none",
    "shape": "square",
    "encoded_url": "https://tnlnk.fr/6ac401093831b&qr"
  },
  "created_at": "2026-10-05T21:56:57+02:00",
  "edit_url": "https://app.tinylink.fr/shortener-edit?id=6ac401093831b"
}

Edit a short link

PATCH/v1/links/{id}

Only send the fields to change: url (the destination), slug, password. null removes the custom address or the password. Changing the destination does not change the short address. Write scope.

curl -X PATCH https://api.tinylink.fr/v1/links/6ac401093831b \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/sale"}'

Possible responses

{
  "id": "6ac401093831b",
  "type": "link",
  "target_url": "https://example.com/sale",
  "slug": "promo",
  "url": "https://tnlnk.fr/promo",
  "status": "active",
  "password_protected": false,
  "restricted": false,
  "tags": [],
  "qr_code": {
    "png": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.png",
    "svg": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.svg",
    "template": "none",
    "shape": "square",
    "encoded_url": "https://tnlnk.fr/6ac401093831b&qr"
  },
  "created_at": "2026-10-05T21:56:57+02:00",
  "edit_url": "https://app.tinylink.fr/shortener-edit?id=6ac401093831b"
}

Delete a short link

DELETE/v1/links/{id}

Deletes the link, its QR code and its statistics: the short address stops redirecting. This cannot be undone. Delete scope.

curl -X DELETE https://api.tinylink.fr/v1/links/6ac401093831b \
  -H "Authorization: Bearer tl_your_token"

Possible responses

No content

Still stuck?

Write to us from the Support tab of your workspace, we answer within one business day.

Contact support