QR codes
BASE https://api.rii.link/v1AUTH: BEARER → AUTHENTICATION
Server-rendered QR codes for any API-created link. SVG for print, PNG for screens, cached on the CDN.
POST
/v1/qrRender a QR code
Rendered server-side and cached. The returned url is permanent — hand it to the print shop and stop worrying.
PARAMETERS
link_idstringREQUIREDThe link this code resolves to.
formatstringpng or svg. Default png.
sizeintegerPixels, 64–4096, default 512.
fg / bgstringSix-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}Retrieve a QR code
The descriptor, not the image. The url stays valid: the code encodes the short link, so routing changes never touch the image — or the print.
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"
}