Link shortener

Generate a QR code

Generate a PNG or SVG QR code and receive the base64-encoded image.

POSThttps://pqno.app/admin/api/encurtar-link/gerarqrcode

Generates a QR code and returns the image in a JSON response. Use HTTP POST with Content-Type: application/json.

Choose one source

Send exactly one of these fields:

  • link_id: ID of a link created by the token issuer. The QR code contains that link's short URL.
  • perfil: true: the token issuer's Link in Bio URL. The profile must already be saved.
  • conteudo: text or a URL up to 1,200 bytes. Accented characters and emoji may use more than one byte per character.

For company tokens, link_id and perfil still refer to the token issuer. For another person's company link, retrieve its url_curta with Get a link and send that URL as conteudo.

Format, size, and colors

Choose png for a fixed-size image or svg for printing and resizing without loss of definition. PNG is the default.

tamanho accepts 256, 512, 1024, or 2048 pixels and defaults to 1024. cor sets the QR code color and fundo sets its background, both in #RRGGBB format. The defaults are #000000 and #ffffff.

Long content may require a larger image. If the API asks for a larger size, increase tamanho and retry. Choose contrasting colors and test scanning before printing.

Returned image

FieldDescription
formatoGenerated format: png or svg.
mimeImage media type: image/png or image/svg+xml.
tamanhoImage width and height, in pixels.
imagem_base64Base64-encoded file content, without a data URL prefix.

Decode dados.imagem_base64 to obtain the file. See Save a QR code image for saving and displaying it.

Request validation

A missing or duplicate source, an unknown field, or an invalid option returns HTTP 400. A link inaccessible through link_id or an unsaved Link in Bio returns 404.

This operation generates an image without creating a link or saving a QR code to the dashboard library.

Parameters

Header

Authorizationstringrequired
Send Bearer followed by your API token, for example Authorization: Bearer YOUR_TOKEN.
Content-Typestringrequired
Use application/json to send a JSON request body.

Body (JSON)

link_idinteger
ID of a link belonging to the token issuer. Choose one source: link_id, perfil, or conteudo.
perfilboolean
Send true to use the token issuer's Link in Bio.
conteudostring
Text or URL up to 1,200 UTF-8 bytes. Accented characters and emoji may use more than one byte.
formatostring
Image format: png or svg. Default: png.
tamanhointeger
Image width and height in pixels: 256, 512, 1024, or 2048. Default: 1024.
corstring
QR code color in #RRGGBB format. Default: #000000.
fundostring
Background color in #RRGGBB format. Default: #ffffff.