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
| Field | Type | Allowed values | Default | Description |
|---|---|---|---|---|
width | number | px | 300 | Output width. |
height | number | px | 300 | Output height. |
type | string | canvas, svg | canvas | Render mode. |
data | string | any | — | Encoded data (usually the link's dynamic URL). Normally set automatically. |
image | string | URL / data URI | null | Logo/image overlaid in the center. |
margin | number | ≥ 0 (px) | 8 | Quiet-zone margin around the code. |
qrOptions (encoding)
| Field | Type | Allowed values | Default |
|---|---|---|---|
typeNumber | number | 0–40 (0 = auto-size) | 0 |
mode | string | Numeric, Alphanumeric, Byte, Kanji | Byte |
errorCorrectionLevel | string | L (7%), M (15%), Q (25%), H (30%) | Q |
dotsOptions (the body pattern)
| Field | Type | Allowed values | Default |
|---|---|---|---|
type | string | square, dots, rounded, extra-rounded, classy, classy-rounded | classy-rounded |
color | string | CSS color / hex | black |
cornersSquareOptions (the eye frames)
| Field | Type | Allowed values | Default |
|---|---|---|---|
type | string | square, dot, extra-rounded | square |
color | string | CSS color / hex | black |
cornersDotOptions (the eye centers)
| Field | Type | Allowed values | Default |
|---|---|---|---|
type | string | square, dot | square |
color | string | CSS color / hex | black |
backgroundOptions
| Field | Type | Allowed values | Default |
|---|---|---|---|
color | string | CSS color / hex | white |
imageOptions (center logo placement)
| Field | Type | Allowed values | Default |
|---|---|---|---|
hideBackgroundDots | boolean | true, false | false |
imageSize | number | 0–1 (fraction of QR size) | 0.5 |
margin | number | ≥ 0 (px) | 0 |
crossOrigin | string | anonymous, use-credentials | anonymous |
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
{
"data": [
{ "id": "f12...903", "name": "Brand QR style", "qrOptions": { "width": 300 } }
]
}
Get a template
GET /templates/:id
Scope: templates.read
curl https://api.prolinksqr.com/templates/f12...903 \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Create a template
POST /templates
Scope: templates.create
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Max 255 chars. |
qrOptions | object | yes | See 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
{ "data": { "id": "f12...903", "name": "Brand QR style", "qrOptions": { "dotsOptions": { "color": "#1E88D4" } } } }
Update a template
PUT /templates/:id
Scope: templates.update
Both fields are optional on update.
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | no | Max 255 chars. |
qrOptions | object | no | See 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" }'
Delete a template
DELETE /templates/:id
Scope: templates.delete
curl -X DELETE https://api.prolinksqr.com/templates/f12...903 \
-H "Authorization: Basic key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"