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

> Delete a variant from the template's draft. The variant stays in the live template until you [commit the template](/reference/commit-template-v2); the commit removes it.

The `default` variant of a channel can't be deleted. To stop sending on a channel, remove it from `enabled_channels` with [Create or Update Template](/reference/upsert-template-v2).




## OpenAPI

````yaml DELETE /v2/{workspace}/template/{template_slug}/channel/{channel}/variant/{variant_id}/
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}/channel/{channel}/variant/{variant_id}/:
    delete:
      summary: Delete Variant
      description: >
        Delete a variant from the template's draft. The variant stays in the
        live template until you [commit the
        template](/reference/commit-template-v2); the commit removes it.


        The `default` variant of a channel can't be deleted. To stop sending on
        a channel, remove it from `enabled_channels` with [Create or Update
        Template](/reference/upsert-template-v2).
      operationId: delete-variant-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: Template slug.
        - in: path
          name: channel
          required: true
          schema:
            type: string
            enum:
              - email
              - sms
              - whatsapp
              - inbox
              - androidpush
              - iospush
              - webpush
              - slack
              - ms_teams
        - in: path
          name: variant_id
          required: true
          schema:
            type: string
          description: ID of the variant to delete.
      responses:
        '204':
          description: Variant deleted from the draft. No response body.
        '400':
          description: The `default` variant can't be deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 400
                error_code: error
                type: ValidationError
                message: '["''default'' variant cannot be deleted"]'
                detail:
                  - '''default'' variant cannot be deleted'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '404':
          description: No variant with this ID in the draft, 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') version: draft, channel:
                  email, variant: fr-test not found
                detail: >-
                  template (slug: 'order-shipped') version: draft, channel:
                  email, variant: fr-test not found
      security:
        - ServiceTokenAuth: []
      servers:
        - url: https://management-api.suprsend.com
      x-codeSamples:
        - lang: cURL
          label: Delete Variant
          source: >
            curl -X DELETE
            "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/channel/{channel}/variant/{variant_id}/"
            \
              --header 'Authorization: ServiceToken <token>'
components:
  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.
  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.
  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)
- [Template Variants](https://docs.suprsend.com/docs/template-variants.md)
- [Pull Template](https://docs.suprsend.com/reference/cli-template-pull.md)
- [Discard Variant](https://docs.suprsend.com/reference/discard-variant-v2.md)
- [Delete a List](https://docs.suprsend.com/reference/delete-list.md)


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