---
title: "Update a template"
method: PATCH
path: "/api/v1/templates/{id}"
tags: ["Templates"]
---

# Update a template

`PATCH /api/v1/templates/{id}`

## Request

- Base URL: `https://qrlia.dev.castlesoft.eu`
- URL: `https://qrlia.dev.castlesoft.eu/api/v1/templates/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `qrc_session`

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `name` string
  - `description` string, nullable
  - `payloadDefaults` object
  - `designId` string, uuid, nullable

## Response `200`

Updated

- Template
  - `id` string, uuid, required
  - `scope` 'tenant' | 'company', required: `tenant` = shared across the whole tenant. `company` = private to one company.
  - `tenantId` string, uuid, required
  - `companyId` string, uuid, nullable, required
  - `qrType` 'url' | 'vcard' | 'profile_card' | 'text' | 'email' | 'phone' | 'sms' | 'whatsapp' | 'wifi' | 'pdf' | 'image' | 'audio' | 'video' | 'app' | 'multilink' | 'menu' | 'feedback' | 'event' | 'dpp' | 'coupon' | 'sepa' | 'paypal' | 'crypto' | 'lead_form', required: Discriminator for QR payload shape.
  - `name` string, required
  - `description` string, nullable, required
  - `payloadDefaults` object, required
  - `designId` string, uuid, nullable, required
  - `createdAt` string, date-time, required

## Other responses

- `400`: Validation failed
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `500`: Internal

---

[API](https://skmtc.dev/qrlia/apis/qrlia-api.md) · [All operations](https://skmtc.dev/qrlia/apis/qrlia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qrlia/apis/qrlia-api/revisions/01c5dd6002ab?raw)
