Aller au contenu

QR codes

The routes for the QR codes of a page or a short link, and the one for the environment's templates. The QR code encodes the element's short address: it stays valid if you change the destination or the custom address.

Generate a QR code

POST/v1/pages/{id}/qr-code

POST/v1/links/{id}/qr-code

Without a request body, the QR code is the classic template: black on white, with the TinyLink logo. Generating again replaces the previous QR code. For a QR code without a logo or in your colours, see the next two blocks. Write scope.

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

Possible responses

{
  "png": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.png",
  "svg": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.svg",
  "template": "classic",
  "shape": "square",
  "encoded_url": "https://tnlnk.fr/6ac401093831b&qr"
}

Generate without a logo

POST/v1/pages/{id}/qr-code{"template": "none"}

POST/v1/links/{id}/qr-code{"template": "none"}

template set to "none": black on white, without the TinyLink logo. Write scope.

curl -X POST https://api.tinylink.fr/v1/links/6ac401093831b/qr-code \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"template":"none"}'

Possible responses

{
  "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"
}

Read a QR code

GET/v1/pages/{id}/qr-code

GET/v1/links/{id}/qr-code

The addresses of the PNG (2048 px) and the SVG. With no QR code generated, the response is 404 qr_code_not_generated. Read scope.

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

Possible responses

{
  "png": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.png",
  "svg": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.svg",
  "template": "classic",
  "shape": "square",
  "encoded_url": "https://tnlnk.fr/6ac401093831b&qr"
}

Download the file

GET/v1/pages/{id}/qr-code?format=png

GET/v1/links/{id}/qr-code?format=svg

With ?format=png or ?format=svg, the response is no longer JSON but the file itself (image/png or image/svg+xml). Read scope.

curl "https://api.tinylink.fr/v1/links/6ac401093831b/qr-code?format=png" \
  -H "Authorization: Bearer tl_your_token" \
  -o qr-promo.png

Possible responses

(the file itself: image/png or image/svg+xml)

List the templates

GET/v1/qr-templates

The templates usable in template: the two TinyLink templates, then those created in the environment (Library, QR codes tab), with their shape (square, rounded or dots) and their colours (background, foreground). The environment's templates only appear with a plan that includes them, Pro or Business. Read scope.

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

Possible responses

{
  "data": [
    {
      "id": "classic",
      "name": "TinyLink",
      "description": "Black on white, with the TinyLink logo.",
      "shape": "square"
    },
    {
      "id": "none",
      "name": "No logo",
      "description": "Black on white, without a logo.",
      "shape": "square"
    },
    {
      "id": "QRT_6a9f2935302bb",
      "name": "Brand 2026",
      "description": null,
      "shape": "rounded",
      "background": "#FFFFFF",
      "foreground": "#212121"
    }
  ]
}

Generate with one of your templates

POST/v1/pages/{id}/qr-code{"template": "QRT_…"}

POST/v1/links/{id}/qr-code{"template": "QRT_…"}

Pass in template the QRT_… id returned by the template list: the QR code takes its shape, colours and logo, and the response names it in template. The template must belong to the token's environment, and the plan must include templates; otherwise the response is 422 validation_failed. Write scope.

curl -X POST https://api.tinylink.fr/v1/links/6ac401093831b/qr-code \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"template":"QRT_6a9f2935302bb"}'

Possible responses

{
  "png": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.png",
  "svg": "https://content.tinylink.fr/QR_Code/QRCode_6ac4011f7a12f.svg",
  "template": "QRT_6a9f2935302bb",
  "shape": "rounded",
  "encoded_url": "https://tnlnk.fr/6ac401093831b&qr"
}

Still stuck?

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

Contact support