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
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | Yes | The unique identifier of the template. |
Request body
All fields are optional. Only included fields are updated.
| Parameter | Type | Description |
|---|---|---|
name | string | Display name for the template. |
description | string | Description of the template. |
design | object | Design configuration (see below). |
Design object
| Parameter | Type | Description |
|---|---|---|
foreground_color | string | Foreground (dot) color as hex. |
background_color | string | Background color as hex. |
error_correction | string | Error correction level: L, M, Q, or H. |
dot_style | string | Dot shape style (e.g. square, rounded, dots, classy). |
corner_style | string | Corner square style (e.g. square, rounded, dot). |
logo_url | string | URL of a logo image to overlay at center. |
logo_size | number | Logo size as a fraction of the QR code (0.1–0.4). |
quiet_zone | integer | Number of module-width quiet zone around the code. |
Request examples
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 } }'const templateId = "tpl_abc123";
const res = await fetch( `https://xqr.co/api/v1/qr/templates/${templateId}`, { method: "PATCH", headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ 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, }, }), });
const { data, meta } = await res.json();import httpx
template_id = "tpl_abc123"
res = httpx.patch( f"https://xqr.co/api/v1/qr/templates/{template_id}", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "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, }, },)
template = res.json()["data"]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?
Thanks for your feedback!