> ## 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.

# Delete (Archive) Template



## OpenAPI

````yaml DELETE /api/v1/ops/workspaces/{workspaceId}/checklists/{templateId}
openapi: 3.1.0
info:
  title: Xenia Team API - Delete (Archive) Template
  version: 1.0.0
  description: Archives a template. Nothing is permanently deleted.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/workspaces/{workspaceId}/checklists/{templateId}:
    delete:
      tags:
        - Templates
      summary: Delete (Archive) Template
      description: >-
        **Archives** the template in this workspace. Nothing is permanently
        deleted, and existing submissions are kept. The template is hidden from
        **List Templates** (unless you pass `archived` or `includeArchived`) and
        can't be used for new submissions.


        Shortly after the call, in the background, the projects and schedules
        that use the template are paused and its open past-due tasks are closed.


        Calling it again on an archived template is harmless. An archived
        template can be restored in the Xenia app, which resumes what the
        archive paused. There is no API endpoint to restore it.


        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.
      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: Template archived.
          content:
            application/json:
              example:
                data: {}
                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".` Also returned when the user may
            only reorder the template.
        '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: {}
        '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.