---
title: "Update template metadata"
method: PATCH
path: "/documents/templates/{templateID}"
tags: ["Guided Templates"]
---

# Update template metadata

`PATCH /documents/templates/{templateID}`

Updates the template's metadata fields (name, description, languages, regions, specialties, labels).
Generation content (template instructions, section composition) is managed through versions
and cannot be updated here.

## Request body

- GuidedTemplatesUpdateRequest
  - `name` string — The name of this template. Not passed to the LLM.
  - `description` string — A description for this template. Not passed to the LLM.
  - `languages` string[] — BCP 47 language tags this template has been tweaked for (e.g. `["fr", "de", "en-GB"]`).
  - `regions` string[] — ISO 3166-1 alpha-3 country codes this template has been tweaked for (e.g. `["BEL"]`).
  - `specialties` string[] — Clinical specialties this template has been tweaked for.
  - `labels` GuidedLabel[] — Labels work as query param filter in the LIST /templates endpoint.
    - `key` string, required
    - `value` string, required

## Response `200`

OK

- GuidedTemplate — Template metadata as returned by the LIST /documents/templates endpoint. Does not include the resolved `publishedVersion` — use GET /documents/templates/{templateID} to fetch a single template with its published version resolved.
  - `id` string, uuid, required — The UUID of the template.
  - `inheritedFromId` string, uuid, nullable — Reference to the template to inherit template instructions and sections from. Inherits from published version by default.
  - `autoGenerated` boolean — True if the template was auto-generated based on the section-composed POST /documents request.
  - `source` 'user' | 'corti' | 'project' — Whether this template was created by the user, a project-related API Client or is a Corti standard resource.
  - `name` string, required — The name of this template. Not passed to the LLM.
  - `description` string — A description for this template. Not passed to the LLM.
  - `languages` string[], required — BCP 47 language tags this template has been tweaked for (e.g. `["fr", "de", "en-GB"]`). Empty means no language-specific tweaks.
  - `regions` string[], required — ISO 3166-1 alpha-3 country codes this template has been tweaked for (e.g. `["BEL"]`). Empty means no region-specific tweaks.
  - `specialties` string[], required — Clinical specialties this template has been tweaked for. Empty means no specialty-specific tweaks.
  - `labels` GuidedLabel[], required — The available labels to use as query param filter in the LIST /templates endpoint.
    - `key` string, required
    - `value` string, required
  - `createdBy` string, uuid — The UUID of the creator of this template.
  - `createdAt` string, date-time, required — The original timestamp when the template was created.
  - `updatedAt` string, date-time, required — The original timestamp when the template was last updated.
  - `deletedAt` string, date-time, nullable — Present when the template has been deleted. GET by ID still returns the full resource with this field populated.
  - `publishedVersion` GuidedTemplateVersion — Template version with fully resolved (inherited) values. Template-level and section-level inheritance chains are walked. Used in Template.publishedVersion on resource-level endpoints (GET/POST template).
    - `id` string, uuid, required — The UUID of the version.
    - `versionNumber` integer, required — Starts at 0 and auto-increments.
    - `deletedAt` string, date-time, nullable — Present when the template version has been deleted.
    - `generation` GuidedTemplateGeneration, required — Fully resolved template generation. Sections are expanded with their own inheritance applied.
      - `instructions` GuidedTemplateInstructions, required
        - `prompt` string, required — Template-level prompt instructions that apply generally to all sections.
      - `sections` GuidedSection[] — Fully resolved sections with inheritance applied.
        - `id` string, uuid, required — The UUID of the section.
        - `inheritedFromId` string, uuid, nullable — Reference to the section to inherit generation configuration from. Inherits from published version by default.
        - `autoGenerated` boolean — True if the section was auto-generated as part of an inline section-composed POST /documents request.
        - `source` 'user' | 'corti' | 'project' — Whether this section was created by the user, a project-related API Client or is a Corti standard resource.
        - `name` string, required — The name of the section.
        - `languages` string[], required — BCP 47 languages this section has been tweaked for. Empty means no language-specific tweaks.
        - `regions` string[], required — ISO 3166-1 alpha-3 country codes this section has been tweaked for. Empty means no region-specific tweaks.
        - `specialties` string[], required — Clinical specialties this section has been tweaked for. Empty means no specialty-specific tweaks.
        - `description` string — The description for the section.
        - `labels` GuidedLabel[], required — The labels available to use as query param filter in the LIST /sections endpoint.
          - `key` string, required
          - `value` string, required
        - `createdBy` string, uuid — The UUID of the creator of this section.
        - `createdAt` string, date-time, required — The original timestamp when the section was created.
        - `updatedAt` string, date-time, required — The original timestamp when the section was last updated.
        - `deletedAt` string, date-time, nullable — Present when the section has been deleted. GET by ID still returns the full resource with this field populated.
        - `publishedVersion` GuidedSectionVersion — A section version. When embedded inside a Section resource (e.g. GET /sections/:id), inheritance is fully resolved. When returned directly from version endpoints (GET/LIST/POST .../versions/...), contains raw authored values without inheritance.
          - `id` string, uuid, required — The UUID of the section version.
          - `versionNumber` integer, required — Starts at 0 and auto-increments.
          - `deletedAt` string, date-time, nullable — Present when the section version has been deleted.
          - `generation` GuidedSectionGeneration, required
            - `heading` string, required — The heading of this section. Passed to the LLM.
            - `instructions` GuidedSectionInstructions, required
              - …
            - `outputSchema` union, required
              - …

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/corti/apis/admin-api.md) · [All operations](https://skmtc.net/corti/apis/admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/corti/admin-api/revisions/5d1895a1b3fc/schema)
