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

# Duplicate Template

> Creates a copy named `"<name> - Copy"` in the same workspace and folder. No request body.

The copy has the source's steps, sections and scoring settings, and starts **unpublished**. Publishing is not available through the API yet; publish the copy in the app. The key's user becomes the copy's template admin, and the source's submission-visibility rows are copied.

Requires **Manage Templates** (`CAN_MANAGE_CHECKLIST`) or **Template Super Admin** (`CHECKLIST_SUPER_ADMIN`). The key acts as its user (the key's default user, or `x-client-user`), so that user's role and template access apply.

The response is the new template's settings with `WorkspaceChecklist`, `Creator` and `ChecklistAccess`. It does not include steps: call **Get Template** with the new `id` for those.



## OpenAPI

````yaml POST /api/v1/ops/workspaces/{workspaceId}/checklists/{templateId}/duplicate
openapi: 3.1.0
info:
  title: Xenia Team API - Duplicate Template
  version: 1.0.0
  description: Copies a template into a new, unpublished template in the same workspace.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/workspaces/{workspaceId}/checklists/{templateId}/duplicate:
    post:
      tags:
        - Templates
      summary: Duplicate Template
      description: >-
        Creates a copy named `"<name> - Copy"` in the same workspace and folder.
        No request body.


        The copy has the source's steps, sections and scoring settings, and
        starts **unpublished**. Publishing is not available through the API yet;
        publish the copy in the app. The key's user becomes the copy's template
        admin, and the source's submission-visibility rows are copied.


        Requires **Manage Templates** (`CAN_MANAGE_CHECKLIST`) or **Template
        Super Admin** (`CHECKLIST_SUPER_ADMIN`). The key acts as its user (the
        key's default user, or `x-client-user`), so that user's role and
        template access apply.


        The response is the new template's settings with `WorkspaceChecklist`,
        `Creator` and `ChecklistAccess`. It does not include steps: call **Get
        Template** with the new `id` for those.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: >-
            UUID of the workspace. Must be the workspace the API key belongs to.
            Only this workspace-in-path form is open to API keys.
          schema:
            type: string
            format: uuid
            example: cb363f7e-c52a-4478-911d-f6a6f791090e
        - name: templateId
          in: path
          required: true
          description: >-
            UUID of the template. Any value that is not UUID-shaped returns `403
            Forbidden: API key not authorized for this route`.
          schema:
            type: string
            format: uuid
            example: 3f1c9a52-8e4b-4d27-9b6a-2a7e5c1d0f84
      responses:
        '200':
          description: >-
            Copy created. The example is abridged: every template setting is
            returned.
          content:
            application/json:
              example:
                data:
                  id: b7d24e19-5c3a-4f8e-a1d6-9e0c4b2f7a35
                  name: Opening Safety Walk - Copy
                  description: Daily walk-through before the store opens
                  icon:
                    icon: Default
                    color: '#FFA681'
                  image: null
                  attachments: []
                  CreatedInWorkspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
                  isPublic: false
                  isPublished: false
                  publishedAt: null
                  parentId: 3f1c9a52-8e4b-4d27-9b6a-2a7e5c1d0f84
                  itemsCount: 3
                  totalLogsCount: 0
                  isScoring: false
                  SubmissionType: BOTH
                  scoringMethodology: additive
                  CreatedBy: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                  UpdatedBy: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                  createdAt: '2026-11-24T10:20:03.274Z'
                  updatedAt: '2026-11-24T10:20:03.274Z'
                  WorkspaceChecklist:
                    id: 7e6d5c4b-3a2f-4e1d-8c0b-9a8f7e6d5c41
                    WorkspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
                    ChecklistId: b7d24e19-5c3a-4f8e-a1d6-9e0c4b2f7a35
                    FolderId: 5e8a7c21-3b94-4d1f-8c6e-0a2b9f4d7e13
                    isEditable: true
                    archivedAt: null
                    scoreConfig: null
                    viewByDeductionRange: true
                  Creator:
                    id: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                    firstName: Dana
                    lastName: Reyes
                  ChecklistAccess:
                    - id: 8f7e6d5c-4b3a-4f2e-9d1c-0b9a8f7e6d52
                      ChecklistId: b7d24e19-5c3a-4f8e-a1d6-9e0c4b2f7a35
                      WorkspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
                      AccessorId: 37d98201-9f3a-41fd-89b3-3be457c3f7ba
                      isEveryone: false
                      groupId: 5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c83
                      role: admin
                meta: {}
        '400':
          description: Bad Request - the workspace's trial or subscription has ended.
        '401':
          description: >-
            Unauthorized - `Invalid client credentials`, or `Client does not
            belong to this workspace` when `workspaceId` is not the key's
            workspace.
        '403':
          description: >-
            Forbidden - `API key not authorized for this route` (path is not the
            workspace-in-path form, or `templateId` is not a UUID), or the key's
            user lacks the permission: `You don't have permission "Can manage
            checklist checklist super admin".`
        '404':
          description: >-
            Not Found - `Checklist not found.` The template does not exist in
            this workspace.
          content:
            application/json:
              example:
                error:
                  message: Checklist not found.
                  meta: {}
        '426':
          description: >-
            Upgrade Required - creating this template would go over the plan's
            template limit.
          content:
            application/json:
              example:
                error:
                  message: You’ve exceeded your usage of Operations Templates.
                  meta:
                    paywall: Operations Templates
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.