Skip to content

Update Template

Updates an existing QR code design template. Only the fields you include in the request body are modified — all other fields remain unchanged.

PATCH /v1/qr/templates/{template_id}
qr:write

Parameters

Path parameters

ParameterTypeRequiredDescription
template_idstringYesThe unique identifier of the template.

Request body

All fields are optional. Only included fields are updated.

ParameterTypeDescription
namestringDisplay name for the template.
descriptionstringDescription of the template.
designobjectDesign configuration (see below).

Design object

ParameterTypeDescription
foreground_colorstringForeground (dot) color as hex.
background_colorstringBackground color as hex.
error_correctionstringError correction level: L, M, Q, or H.
dot_stylestringDot shape style (e.g. square, rounded, dots, classy).
corner_stylestringCorner square style (e.g. square, rounded, dot).
logo_urlstringURL of a logo image to overlay at center.
logo_sizenumberLogo size as a fraction of the QR code (0.1–0.4).
quiet_zoneintegerNumber of module-width quiet zone around the code.

Request examples

Terminal window
curl -X PATCH https://xqr.co/api/v1/qr/templates/tpl_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Brand Primary v2",
"design": {
"foreground_color": "#7C3AED",
"background_color": "#FAFAFA",
"error_correction": "H",
"dot_style": "dots",
"corner_style": "rounded",
"logo_url": "https://cdn.xqr.co/logos/brand-v2.png",
"logo_size": 0.3,
"quiet_zone": 2
}
}'

Response

200 OK
{
"data": {
"id": "tpl_abc123",
"name": "Brand Primary v2",
"description": "Main brand QR style with purple dots and rounded corners",
"design": {
"foreground_color": "#7C3AED",
"background_color": "#FAFAFA",
"error_correction": "H",
"dot_style": "dots",
"corner_style": "rounded",
"logo_url": "https://cdn.xqr.co/logos/brand-v2.png",
"logo_size": 0.3,
"quiet_zone": 2
},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-03-21T15:45:00Z"
},
"meta": {
"request_id": "req_e2b47f",
"rate_limit": {
"remaining": 45,
"reset_at": "2026-03-21T12:01:00Z"
}
}
}

Was this page helpful?