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

> API to update an template by template id



## OpenAPI

````yaml /api-reference/invoices/openapi.json delete /invoices/template/{templateId}
openapi: 3.0.0
info:
  title: Invoice API
  description: Documentation for invoice API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Invoice
    description: Documentation for invoice API
  - name: Template
    description: Documentation for invoice API
  - name: Schedule
    description: Documentation for invoice API
  - name: Text2Pay
    description: Documentation for invoice API
  - name: Estimate
    description: Documentation for invoice API
paths:
  /invoices/template/{templateId}:
    delete:
      tags:
        - Template
      summary: Delete template
      description: API to update an template by template id
      operationId: delete-invoice-template
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: templateId
          required: true
          in: path
          description: Template Id
          schema:
            example: 6578278e879ad2646715ba9c
            type: string
        - name: altId
          required: true
          in: query
          description: location Id / company Id based on altType
          schema:
            example: 6578278e879ad2646715ba9c
            type: string
        - name: altType
          required: true
          in: query
          description: Alt Type
          schema:
            example: location
            enum:
              - location
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteInvoiceTemplateResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access:
            - invoices/template.write
        - Agency-Access:
            - invoices/template.write
components:
  schemas:
    DeleteInvoiceTemplateResponseDto:
      type: object
      properties:
        success:
          type: boolean
          description: success
          example: true
      required:
        - success
    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

````