> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Note Template

> Persist the selected template on a note, before generation.

AI scribe notes pick a template before generation; persisting it here (rather than
only patching the client cache) lets the selection survive navigating away and back.
The pre-generation-only semantics and race guard live in ``select_note_template``.



## OpenAPI

````yaml patch /notes/{note_id}/template
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /notes/{note_id}/template:
    patch:
      tags:
        - Clinical Notes
      summary: Update Note Template
      description: >-
        Persist the selected template on a note, before generation.


        AI scribe notes pick a template before generation; persisting it here
        (rather than

        only patching the client cache) lets the selection survive navigating
        away and back.

        The pre-generation-only semantics and race guard live in
        ``select_note_template``.
      operationId: update_note_template_notes__note_id__template_patch
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: note_id
          in: path
          required: true
          schema:
            type: string
            title: Note Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoteTemplateIdUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    NoteTemplateIdUpdate:
      properties:
        templateId:
          type: string
          title: Templateid
      type: object
      required:
        - templateId
      title: NoteTemplateIdUpdate
      description: >-
        Persist the template selected for a note before generation (AI scribe
        selection).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````