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

# Update a template



## OpenAPI

````yaml post /templates/{identifier}
openapi: 3.1.0
info:
  title: joyfill
  version: '1.1'
servers:
  - url: https://api-joy.joyfill.io/v1
security:
  - sec0: []
paths:
  /templates/{identifier}:
    post:
      summary: Update a template
      operationId: update-a-template
      parameters:
        - name: identifier
          in: path
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: >-
            Supports both API Key and User Access Token authorization. See
            https://joyfill.mintlify.app/api/authentication
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - files
                - fields
              properties:
                name:
                  type: string
                files:
                  type: array
                  description: >-
                    Array of JoyDoc file objects. See the JoyDoc data structure
                    under the guides section.
                fields:
                  type: array
                  description: >-
                    Array of JoyDoc field objects. See the JoyDoc data structure
                    under the guides section to learn more.
                group:
                  type: string
                  description: >-
                    The group identifier of the group that you would like to add
                    the document to
                stage:
                  type: string
                  default: published
                  enum:
                    - draft
                    - published
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "type": "String",
                      "identifer": "String",
                      "name": "String",
                      "group": "String",
                      "stage": "String",
                      "files": ["JoyDocFile","etc."],
                       
                    }
      deprecated: false
      security: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````