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

# Delete a Template

> Use this endpoint to soft delete a template from the system. The record won't be physically removed from the database. Instead, the data stays stored but is marked inactive and excluded from standard queries. The `deletedAt` field is set with the timestamp when the deletion occurred.



## OpenAPI

````yaml /en/openapi/v3-current/reporter.yaml delete /v1/templates/{id}
openapi: 3.1.0
info:
  title: Reporter
  description: ''
  version: 1.2.0
servers:
  - url: https://reporter.sandbox.lerian.net
security: []
tags: []
paths:
  /v1/templates/{id}:
    delete:
      tags:
        - Templates API
      summary: Delete a Template
      description: >-
        Use this endpoint to soft delete a template from the system. The record
        won't be physically removed from the database. Instead, the data stays
        stored but is marked inactive and excluded from standard queries. The
        `deletedAt` field is set with the timestamp when the deletion occurred.
      parameters:
        - $ref: '#/components/parameters/TemplateId'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/XOrganizationId'
      responses:
        '204':
          description: If the request is successful, you'll get an empty response.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Error0004:
                  $ref: '#/components/examples/Error0004'
                Error0009:
                  $ref: '#/components/examples/Error0009'
                Error0011:
                  $ref: '#/components/examples/Error0011'
                Error0012:
                  $ref: '#/components/examples/Error0012'
                Error0015:
                  $ref: '#/components/examples/Error0015'
                Error0016:
                  $ref: '#/components/examples/Error0016'
                Error0017:
                  $ref: '#/components/examples/Error0017'
                Error0018:
                  $ref: '#/components/examples/Error0018'
                Error0019:
                  $ref: '#/components/examples/Error0019'
      security: []
components:
  parameters:
    TemplateId:
      name: id
      in: path
      description: Unique identifier of the template that you want to retrieve (UUID).
      required: true
      schema:
        type: string
    Authorization:
      name: Authorization
      in: header
      description: >-
        The authorization token in the 'Bearer <token>' format.  


        **Important:** This header is required if your environment has Access
        Manager enabled. For more information, refer to the [Access
        Manager](/en/access-manager) documentation.
      required: false
      schema:
        type: string
    XOrganizationId:
      name: X-Organization-id
      in: header
      description: The unique identifier of the Organization associated with the request.
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
      description: Response message error.
      required:
        - code
        - title
        - message
  examples:
    Error0004:
      summary: Invalid header
      value:
        code: TPL-0004
        title: Invalid header
        message: >-
          One or more header values are missing or incorrectly formatted. Please
          verify required headers %VALUE.
    Error0009:
      summary: Invalid Path Parameter
      value:
        code: TPL-0009
        title: Invalid Path Parameter
        message: >-
          Path parameters is in an incorrect format. Please check the following
          parameter %v and ensure they meet the required format before trying
          again.
    Error0011:
      summary: Entity Not Found
      value:
        code: TPL-0011
        title: Entity Not Found
        message: >-
          No %v entity was found for the given ID. Please make sure to use the
          correct ID for the entity you are trying to manage.
    Error0012:
      summary: Invalid templateId
      value:
        code: TPL-0012
        title: Invalid templateId
        message: >-
          The specified templateId is not a valid UUID. Please check the value
          passed.
    Error0015:
      summary: Unexpected Fields in the Request
      value:
        code: TPL-0015
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields as per the documentation. The unexpected fields are
          listed in the fields object.
    Error0016:
      summary: Missing Fields in Request
      value:
        code: TPL-0016
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    Error0017:
      summary: Bad Request
      value:
        code: TPL-0017
        title: Bad Request
        message: >-
          The server could not understand the request due to malformed syntax.
          Please check the listed fields and try again.
    Error0018:
      summary: Internal Server Error
      value:
        code: TPL-0018
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.
    Error0019:
      summary: Invalid Query Parameter
      value:
        code: TPL-0019
        title: Invalid Query Parameter
        message: >-
          One or more query parameters are in an incorrect format. Please check
          the following parameters '%v' and ensure they meet the required format
          before trying again.

````