Códigos QR

BASE  https://api.rii.link/v1AUTH: BEARER → AUTENTICACIÓN

Códigos QR generados en el servidor para cualquier enlace creado con la API. SVG para imprimir, PNG para pantallas, en caché en la CDN.

POST/v1/qr

Generar un código QR

Se genera en el servidor y se guarda en caché. La url devuelta es permanente — dásela a la imprenta y olvídate.

PARÁMETROS
link_idstringOBLIGATORIO

The link this code resolves to.

formatstring

png or svg. Default png.

sizeinteger

Pixels, 64–4096, default 512.

fg / bgstring

Six-digit hex colors, default #000000 / #FFFFFF. Contrast below 4.5:1 is rejected.

REQUEST
curl -X POST https://api.rii.link/v1/qr \
-H "Authorization: Bearer $RII_KEY" \
-H "Content-Type: application/json" \
-d '{ "link_id": "lnk_8h2f0qZ3Tk1mR4vXw9aBcQ", "format": "svg", "fg": "#16161f" }'
RESPONSE · 201
{
"id": "qr_7d21sPq9Ke4uZm2xVb8tNw",
"link_id": "lnk_8h2f0qZ3Tk1mR4vXw9aBcQ",
"format": "svg",
"size": 512,
"fg": "#16161F",
"bg": "#FFFFFF",
"url": "https://cdn.rii.link/…/9c1e….svg",
"scans": 0,
"created_at": "2026-08-12T09:16:40Z"
}
GET/v1/qr/{id}

Obtener un código QR

El descriptor, no la imagen. La url sigue siendo válida: el código contiene el enlace corto, así que los cambios de enrutamiento nunca tocan la imagen — ni lo impreso.

REQUEST
curl https://api.rii.link/v1/qr/qr_7d21sPq9Ke4uZm2xVb8tNw \
-H "Authorization: Bearer $RII_KEY"
RESPONSE · 200
{
"id": "qr_7d21sPq9Ke4uZm2xVb8tNw",
"link_id": "lnk_8h2f0qZ3Tk1mR4vXw9aBcQ",
"format": "svg",
"size": 512,
"fg": "#16161F",
"bg": "#FFFFFF",
"url": "https://cdn.rii.link/…/9c1e….svg",
"scans": 3241,
"created_at": "2026-08-12T09:16:40Z"
}