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

# Delete a message template

> Delete a message template. Only a template still in `draft` can be deleted: once it is under review or registered with providers it can no longer be removed.

In order to get access to this endpoint, contact our support team.


Delete a message template. Only a template still in `draft` can be deleted: once it is submitted, the deletion is refused with `template_not_editable`. Contact support to retire a template that has already been registered.


## OpenAPI

````yaml delete /v2/notify/management/templates/{template_id}
openapi: 3.1.0
info:
  title: Prelude API
  version: 2.0.0
  description: The Prelude API allows you to send messages to your users.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - apiToken: []
tags:
  - name: Notify
    description: Send transactional and marketing messages with compliance enforcement.
  - name: Transactional
    description: Send transactional messages (deprecated - use Notify API instead).
  - name: Verify
    description: Verify phone numbers.
  - name: Watch
    description: Evaluate email addresses and phone numbers for trustworthiness.
  - name: Lookup
    description: >-
      Retrieve detailed information about a phone number including carrier data,
      line type, and portability status.
paths:
  /v2/notify/management/templates/{template_id}:
    delete:
      tags:
        - Notify
      summary: Delete a message template
      description: >
        Delete a message template. Only a template still in `draft` can be
        deleted: once it is under review or registered with providers it can no
        longer be removed.


        In order to get access to this endpoint, contact our support team.
      operationId: deleteNotifyTemplate
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
          description: The identifier of the template.
          example: template_01k8ap1btqf5r9fq2c8ax5fhc9
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteNotifyTemplateResponse'
        '400':
          description: KO
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DeleteNotifyTemplateResponse:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The identifier of the template that was deleted.
          examples:
            - template_01k8ap1btqf5r9fq2c8ax5fhc9
    Error:
      type: object
      properties:
        code:
          type: string
          description: The error code.
          examples:
            - invalid_phone_number
        message:
          type: string
          examples:
            - >-
              The provided phone number is invalid. Provide a valid E.164 phone
              number.
          description: A human-readable message describing the error.
        type:
          type: string
          examples:
            - bad_request
          description: The error type.
        request_id:
          type: string
          examples:
            - 3d19215e-2991-4a05-a41a-527314e6ff6a
          description: >-
            A string that identifies this specific request. Report it back to us
            to help us diagnose your issues.
        param:
          type: string
          examples:
            - phone_number
          description: The parameter the error refers to, when it applies to a single one.
      required:
        - code
        - message
        - type
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer

````