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

# Delete Variant

> Removes a message variant from a step

## Overview

Permanently removes a message variant from a step. Use this to clean up underperforming variants or simplify your A/B testing rotation.

## When to Delete a Variant

* **Underperforming messages**: Remove variants that consistently get lower response rates
* **Completed tests**: After determining a winner in your A/B test
* **Simplifying rotation**: Reduce the number of variants for more focused testing
* **Strategy changes**: Remove messages that no longer align with your campaign goals

## What Happens

1. The variant is permanently deleted
2. The variant order may be adjusted for remaining variants
3. Future leads won't receive this variant
4. Historical data is preserved in analytics

## Response

Returns the updated array of variants for the step, showing the remaining active variants.

## Important Considerations

<Warning>
  This action cannot be undone. The variant and its configuration are permanently removed.
</Warning>

<Info>
  **Minimum Variants**: If this is the only variant for a step, consider either:

  * Adding a new variant before deleting this one
  * Deleting the entire step instead
</Info>

## Impact on Analytics

* Leads who already received this variant remain in the analytics
* Performance metrics for this variant are preserved
* New leads will be assigned to remaining variants

## Alternative: Disable Instead of Delete

If you're not sure whether to permanently remove a variant, consider using the [Update Variant](/api-reference/endpoint/update-variant) endpoint to disable it instead:

```json theme={null}
{
  "isDisabled": true
}
```

This allows you to:

* Preserve the variant for future use
* Keep all historical data and configuration
* Re-enable it later if needed

## Best Practices

1. **Analyze first**: Review variant performance before deleting
2. **Document why**: Keep notes on why variants were removed
3. **Gradual refinement**: Remove variants one at a time and monitor impact
4. **Backup content**: Save successful message templates for future campaigns


## OpenAPI

````yaml DELETE /v1/campaigns/{id}/steps/{stepId}/variants/{variantId}
openapi: 3.1.0
info:
  title: WaLead API
  description: >-
    WaLead Public API for managing LinkedIn outreach campaigns, leads, and
    analytics
  version: 1.0.0
  contact:
    name: WaLead Support
    url: https://walead.ai
servers:
  - url: https://app-api.walead.ai/api
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /v1/campaigns/{id}/steps/{stepId}/variants/{variantId}:
    delete:
      summary: Delete Variant
      description: Removes a message variant from a step
      parameters:
        - name: id
          in: path
          description: Campaign ID
          required: true
          schema:
            type: string
        - name: stepId
          in: path
          description: Step ID
          required: true
          schema:
            type: string
        - name: variantId
          in: path
          description: Variant ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Variant deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  variants:
                    type: array
                    items:
                      $ref: '#/components/schemas/StepVariant'
        '401':
          description: Unauthorized - Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Campaign, step, or variant not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    StepVariant:
      type: object
      properties:
        id:
          type: string
          description: Unique variant identifier
        body:
          type: string
          description: Message template content
        order:
          type: integer
          description: Variant order for rotation
        isDisabled:
          type: boolean
          description: Whether this variant is disabled
        icpDefinitionRaw:
          type: string
          nullable: true
          description: ICP (Ideal Customer Profile) definition for targeting
        stepId:
          type: string
          description: Associated step ID
        aiTools:
          type: array
          items:
            $ref: '#/components/schemas/AITool'
          description: AI tools enabled for this variant
    Error:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
    AITool:
      type: object
      properties:
        name:
          type: string
          description: AI tool name
        key:
          type: string
          description: AI tool unique key
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Generate from your WaLead dashboard.

````