> ## 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 Step from Campaign

> Removes a step from the campaign sequence

## Overview

Removes a step from your campaign sequence. This is a destructive action that cannot be undone, so use with caution.

## What Happens When You Delete a Step

1. **Step is removed**: The step and all its variants are permanently deleted
2. **Sequence is reordered**: Steps after the deleted one move up in order
3. **Leads are adjusted**: Leads already in the campaign have their progress updated
4. **Completed leads checked**: If leads had completed the campaign, they may be reset if the deletion creates new steps to execute

## Impact on Active Campaigns

If you delete a step from an active campaign:

* Leads who haven't reached this step will skip it
* Leads currently at this step will move to the next one
* Leads who have passed this step are unaffected (unless they were marked as completed)

## Response

Returns the updated array of steps after deletion, reflecting the new sequence order.

## Important Notes

<Warning>
  Deleting a step cannot be undone. Consider pausing the campaign first if you're testing sequence changes.
</Warning>

<Info>
  If you want to temporarily disable a step, consider disabling all its variants instead of deleting the entire step.
</Info>

## Before Deleting

Consider:

* Are there leads currently at this step?
* Do you want to preserve the message templates for future use?
* Would pausing or disabling variants be a better option?


## OpenAPI

````yaml DELETE /v1/campaigns/{id}/steps/{stepId}
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}:
    delete:
      summary: Delete Step
      description: Removes a step from the campaign sequence
      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
      responses:
        '200':
          description: Step deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  steps:
                    type: array
                    items:
                      $ref: '#/components/schemas/Step'
        '401':
          description: Unauthorized - Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Campaign or step not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Step:
      type: object
      properties:
        id:
          type: string
          description: Unique step identifier
        type:
          type: string
          enum:
            - invitation
            - message
            - visit_profile
            - screener
          description: Step type
        order:
          type: integer
          description: Step position in sequence (0-based)
        delay:
          type: integer
          description: Delay in days before executing this step
        stopOnReply:
          type: boolean
          description: Whether to stop the sequence if lead replies
        genericBody:
          type: string
          nullable: true
          description: Generic message template for the step
        variants:
          type: array
          items:
            $ref: '#/components/schemas/StepVariant'
          description: >-
            Message variants for A/B testing (only for message and screener
            steps)
    Error:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
    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
    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.

````