---
title: "Updates an existing template."
method: PUT
path: "/templates/{id}"
tags: ["Templates"]
---

# Updates an existing template.

`PUT /templates/{id}`

## Path parameters

- `id` string, required

## Request body

- UpdateTemplateDto — Request DTO for updating a template.
  - `name` string, nullable
  - `type` string, nullable
  - `logoUrl` string, nullable
  - `headerContent` string, nullable — Legacy field - use Sections instead for new templates.
  - `footerContent` string, nullable — Legacy field - use Sections instead for new templates.
  - `sections` TemplateSectionDto[], nullable — Block-based content sections.
    - `id` string
    - `type` string
    - `content` string
    - `order` union
      - integer
      - string, int32
    - `columns` TemplateSectionDto[], nullable
    - `widthPercent` union
      - number, double
      - string, double
  - `format` string, nullable
  - `emailSubject` string, nullable
  - `emailBody` string, nullable
  - `smsBody` string, nullable
  - `isDefault` boolean, nullable

## Response `200`

OK

- TemplateResponseDto — Response DTO for a template.
  - `id` string
  - `name` string
  - `type` string
  - `logoUrl` string, nullable
  - `headerContent` string, nullable — Legacy field - kept for backward compatibility.
  - `footerContent` string, nullable — Legacy field - kept for backward compatibility.
  - `sections` TemplateSectionDto[], nullable — Block-based content sections.
    - `id` string
    - `type` string
    - `content` string
    - `order` union
      - integer
      - string, int32
    - `columns` TemplateSectionDto[], nullable
    - `widthPercent` union
      - number, double
      - string, double
  - `format` string, nullable
  - `emailSubject` string, nullable
  - `emailBody` string, nullable
  - `smsBody` string, nullable
  - `isDefault` boolean
  - `createdById` string, nullable
  - `createdBy` UserSummaryDto
    - `id` string
    - `email` string
    - `firstName` string, nullable
    - `lastName` string, nullable
    - `displayName` string, nullable
    - `type` string
    - `roleId` string, nullable
    - `roleName` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `unknownVariables` string[], nullable — Set on create/update responses only: {{tokens}} in the saved sections that the render pipeline will not substitute for this template's type (typos or variables from another template type). Null when everything is known or validation was not run.

---

[API](https://skmtc.net/clinicos/apis/pawthosx-business-api-v1.md) · [All operations](https://skmtc.net/clinicos/apis/pawthosx-business-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clinicos/pawthosx-business-api-v1/revisions/a905bde4e796/schema)
