QR codes

BASE  https://api.rii.link/v1AUTH: BEARER → AUTHENTICATION

Server-rendered QR codes for any link. SVG for print, PNG for screens, cached on the CDN.

POST/v1/qr

Render a QR code

Rendered server-side and cached. The returned url is permanent — hand it to the print shop and stop worrying.

PARAMETERS
link_idstringREQUIRED

The link this code resolves to.

formatstring

png or svg. Default png.

sizeinteger

Pixels, PNG only. 64–4096, default 512.

fg / bgstring

Hex colors. Keep contrast ≥ 4.5:1 or scanners give up.

REQUEST
curl -X POST https://api.rii.link/v1/qr \
-H "Authorization: Bearer $RII_KEY" \
-H "Content-Type: application/json" \
-d '{ "link_id": "lnk_8h2f0q", "format": "svg", "fg": "#16161f" }'
RESPONSE · 201
{
"id": "qr_7d21s",
"link_id": "lnk_8h2f0q",
"format": "svg",
"url": "https://cdn.rii.link/qr/qr_7d21s.svg"
}
GET/v1/qr/{id}

Retrieve a QR code

The descriptor, not the image. The url stays valid forever: if the link’s routing changes, the code re-renders — the print never has to.

REQUEST
curl https://api.rii.link/v1/qr/qr_7d21s \
-H "Authorization: Bearer $RII_KEY"
RESPONSE · 200
{
"id": "qr_7d21s",
"link_id": "lnk_8h2f0q",
"format": "svg",
"url": "https://cdn.rii.link/qr/qr_7d21s.svg",
"scans": 3241
}