Skip to main content

Templates

Templates store reusable QR code styling (qrOptions) so you can apply a consistent look across links. The same qrOptions object is used when you patch a link's QR code.

All endpoints require an API key with the scope noted on each.


QR options

The qrOptions object describes the QR appearance. It follows the qr-code-styling schema. All fields are optional — omit any you don't want to customize, and the default is used.

Top-level

FieldTypeAllowed valuesDefaultDescription
widthnumberpx300Output width.
heightnumberpx300Output height.
typestringcanvas, svgcanvasRender mode.
datastringanyEncoded data (usually the link's dynamic URL). Normally set automatically.
imagestringURL / data URInullLogo/image overlaid in the center.
marginnumber≥ 0 (px)8Quiet-zone margin around the code.

qrOptions (encoding)

FieldTypeAllowed valuesDefault
typeNumbernumber040 (0 = auto-size)0
modestringNumeric, Alphanumeric, Byte, KanjiByte
errorCorrectionLevelstringL (7%), M (15%), Q (25%), H (30%)Q

dotsOptions (the body pattern)

FieldTypeAllowed valuesDefault
typestringsquare, dots, rounded, extra-rounded, classy, classy-roundedclassy-rounded
colorstringCSS color / hexblack

cornersSquareOptions (the eye frames)

FieldTypeAllowed valuesDefault
typestringsquare, dot, extra-roundedsquare
colorstringCSS color / hexblack

cornersDotOptions (the eye centers)

FieldTypeAllowed valuesDefault
typestringsquare, dotsquare
colorstringCSS color / hexblack

backgroundOptions

FieldTypeAllowed valuesDefault
colorstringCSS color / hexwhite

imageOptions (center logo placement)

FieldTypeAllowed valuesDefault
hideBackgroundDotsbooleantrue, falsefalse
imageSizenumber01 (fraction of QR size)0.5
marginnumber≥ 0 (px)0
crossOriginstringanonymous, use-credentialsanonymous
note

The ProLinksQR dashboard exposes a curated subset of these (e.g. dot patterns square / dots / rounded / extra-rounded and eye styles built from square, dot, and extra-rounded). The API accepts any value supported by qr-code-styling — see its documentation for the full range and gradient options.

Example qrOptions:

{
"width": 300,
"height": 300,
"margin": 8,
"qrOptions": { "typeNumber": 0, "mode": "Byte", "errorCorrectionLevel": "Q" },
"dotsOptions": { "color": "#1E88D4", "type": "rounded" },
"backgroundOptions": { "color": "#ffffff" },
"cornersSquareOptions": { "color": "#155f94", "type": "extra-rounded" },
"cornersDotOptions": { "color": "#155f94", "type": "dot" },
"imageOptions": { "imageSize": 0.4, "margin": 4, "crossOrigin": "anonymous" }
}

List templates

GET /templates

Scope: templates.read

curl https://api.prolinksqr.com/templates \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response 200

Templates are sorted by creation date, newest first. Note that stored QR options are returned under the qr_options key (snake_case), while requests send them as qrOptions.

{
"data": [
{
"id": "f12...903",
"name": "Brand QR style",
"qr_options": { "width": 300 },
"created_at": "Jun 24, 2026",
"updated_at": "Jun 24, 2026"
}
]
}

Get a template

GET /templates/:id

Scope: templates.read

curl https://api.prolinksqr.com/templates/f12...903 \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response 200

{
"data": {
"id": "f12...903",
"name": "Brand QR style",
"qr_options": { "width": 300 }
}
}

Create a template

POST /templates

Scope: templates.create

FieldTypeRequiredNotes
namestringyesMax 255 chars.
qrOptionsobjectyesSee QR options.
curl -X POST https://api.prolinksqr.com/templates \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Brand QR style",
"qrOptions": {
"dotsOptions": { "color": "#1E88D4", "type": "rounded" },
"backgroundOptions": { "color": "#ffffff" }
}
}'

Response 200

Unlike most endpoints, create returns the new template object directly (no data wrapper), with the QR options under qr_options:

{
"id": "f12...903",
"account_id": "7b2d...a10",
"name": "Brand QR style",
"qr_options": { "dotsOptions": { "color": "#1E88D4" } },
"created_at": "2026-06-24T09:14:02.511Z",
"updated_at": "2026-06-24T09:14:02.511Z"
}

Update a template

PUT /templates/:id

Scope: templates.update

Both fields are optional on update.

FieldTypeRequiredNotes
namestringnoMax 255 chars.
qrOptionsobjectnoSee QR options.
curl -X PUT https://api.prolinksqr.com/templates/f12...903 \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "name": "Brand QR style v2" }'

Response 200

The response body is empty ({}). Fetch the template again to see the updated values.


Delete a template

DELETE /templates/:id

Scope: templates.delete

curl -X DELETE https://api.prolinksqr.com/templates/f12...903 \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response 200

{ "message": "Link archived" }
note

The confirmation message currently reads "Link archived"; the template is permanently deleted.