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

# Update Template Route



## OpenAPI

````yaml /api/openapi.json patch /api/templates/{template_id}
openapi: 3.1.0
info:
  title: Halite
  version: 0.1.0
servers: []
security: []
paths:
  /api/templates/{template_id}:
    patch:
      tags:
        - templates
      summary: Update Template Route
      operationId: update_template_route_api_templates__template_id__patch
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Template Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateShareUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandTemplateOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TemplateShareUpdate:
      properties:
        is_shared:
          type: boolean
          title: Is Shared
      type: object
      required:
        - is_shared
      title: TemplateShareUpdate
    CommandTemplateOut:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        description:
          type: string
          maxLength: 500
          title: Description
          default: ''
        target:
          type: string
          maxLength: 1024
          minLength: 1
          title: Target
        target_type:
          type: string
          enum:
            - glob
            - list
            - pcre
            - grain
            - nodegroup
            - compound
          title: Target Type
          default: glob
        fun:
          type: string
          maxLength: 128
          minLength: 1
          title: Fun
        args:
          items:
            type: string
          type: array
          title: Args
          default: []
        kwargs:
          additionalProperties: true
          type: object
          title: Kwargs
        is_shared:
          type: boolean
          title: Is Shared
          default: false
        id:
          type: string
          format: uuid
          title: Id
        owner_user_id:
          type: string
          format: uuid
          title: Owner User Id
        owner_username:
          type: string
          title: Owner Username
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - name
        - target
        - fun
        - id
        - owner_user_id
        - owner_username
        - created_at
        - updated_at
      title: CommandTemplateOut
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````