Skip to content

Render Template

Renders a QR code image using a previously saved design template. Pass the content to encode as a query parameter and the template’s design settings are applied automatically. The response is the raw image binary.

POST /v1/qr/templates/{template_id}/render
qr:render

Parameters

Path parameters

ParameterTypeRequiredDescription
template_idstringYesThe unique identifier of the template.

Query parameters

ParameterTypeRequiredDefaultDescription
datastringYesThe URL or text to encode in the QR code.
formatstringNosvgOutput format: svg or png.
sizeintegerNo10Module size multiplier (1–50).

Request examples

Terminal window
curl "https://xqr.co/api/v1/qr/templates/tpl_abc123/render?data=https%3A%2F%2Fexample.com&format=png&size=20" \
-H "Authorization: Bearer YOUR_API_KEY" \
--output qr.png

Response

200 OK

The response body is the raw image binary with the appropriate content type header.

FormatContent-Type
svgimage/svg+xml
pngimage/png

Was this page helpful?