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

# Delete a template

> Delete a template



## OpenAPI

````yaml /api-reference/emails/openapi.json delete /emails/builder/{locationId}/{templateId}
openapi: 3.0.0
info:
  title: Email API
  description: Documentation for emails API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Emails
    description: Documentation for emails API
  - name: Campaigns
    description: Documentation for emails API
  - name: Templates
    description: Documentation for emails API
  - name: Statistics
    description: Documentation for emails API
paths:
  /emails/builder/{locationId}/{templateId}:
    delete:
      tags:
        - Templates
      summary: Delete a template
      description: Delete a template
      operationId: delete-template
      parameters:
        - name: locationId
          required: true
          in: path
          schema:
            type: string
            example: ve9EPM428h8vShlRW1KT
        - name: templateId
          required: true
          in: path
          schema:
            type: string
            example: zYy3YOUuHxgomU1uYJty
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
            example: '2021-07-28'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteBuilderSuccesfulResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '404':
          description: Not Found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access:
            - emails/builder.write
components:
  schemas:
    DeleteBuilderSuccesfulResponseDto:
      type: object
      properties:
        ok:
          type: string
          example: 'true'
          description: ok
        traceId:
          type: string
          example: 0c52e980-41f6-4be7-8c4b-32332ss
          description: trace id
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error

````