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

# Delete Template

> Delete a template. SuprSend archives it: the template no longer appears in the template list, and `GET` returns `404`. Its slug and name become free to reuse for a new template.

Deleting isn't blocked when a live workflow uses the template, so check which workflows send it before you delete it.




## OpenAPI

````yaml DELETE /v2/{workspace}/template/{template_slug}/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v2/{workspace}/template/{template_slug}/:
    delete:
      summary: Delete Template
      description: >
        Delete a template. SuprSend archives it: the template no longer appears
        in the template list, and `GET` returns `404`. Its slug and name become
        free to reuse for a new template.


        Deleting isn't blocked when a live workflow uses the template, so check
        which workflows send it before you delete it.
      operationId: delete-template-v2
      parameters:
        - in: path
          name: workspace
          required: true
          schema:
            type: string
          description: Workspace slug.
        - in: path
          name: template_slug
          required: true
          schema:
            type: string
          description: Slug of the template to delete.
      responses:
        '204':
          description: Template deleted. No response body.
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '404':
          description: No template with this slug, or it's already deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 404
                error_code: not_found
                type: NotFound
                message: 'template (slug: ''order-shipped'') not found'
                detail: 'template (slug: ''order-shipped'') not found'
      security:
        - ServiceTokenAuth: []
      servers:
        - url: https://management-api.suprsend.com
      x-codeSamples:
        - lang: cURL
          label: Delete Template
          source: >
            curl -X DELETE
            "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/"
            \
              --header 'Authorization: ServiceToken <token>'
components:
  responses:
    AuthenticationError:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            error_code: authentication_failed
            type: AuthenticationFailed
            message: Invalid service token.
            detail: Invalid service token.
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
        error_code:
          type: string
          description: Specific error code identifier
        type:
          type: string
          description: Error type classification
        message:
          type: string
          description: Human-readable error message
        detail:
          oneOf:
            - type: string
            - type: object
            - type: array
              items:
                type: string
          description: >-
            Additional error details. A string for most errors. For validation
            errors, either an object mapping field names to their error
            messages, or an array of messages when the error is not tied to a
            field.
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.
    ServiceTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass as `Authorization: ServiceToken <token>`. You can get Service Token
        from [SuprSend dashboard -> Account Settings -> Service
        Tokens](https://app.suprsend.com/en/account-settings/service-tokens)
        section.

````

## Related topics

- [CI/CD with the SuprSend CLI](https://docs.suprsend.com/reference/cli-ci-cd.md)
- [Delete Variant](https://docs.suprsend.com/reference/delete-variant-v2.md)
- [Template Variants](https://docs.suprsend.com/docs/template-variants.md)
- [Pull Template](https://docs.suprsend.com/reference/cli-template-pull.md)
- [Email](https://docs.suprsend.com/docs/email-template.md)


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