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

# Delete a subsequence

> **Delete a subsequence branch**

Removes the entry edge and every node in the branch. Deleting the last branch
on a campaign sets `subsequences_enabled` back to false, which stops branch
dispatch for that campaign -- MAIN follow-ups are unaffected either way, since
the flag gates branches only.

Leads already enrolled keep their enrollment rows for reporting, but pending
branch emails are no longer dispatched once the nodes are gone.

## Example Usage

```python
import requests

campaign_id     = "550e8400-e29b-41d4-a716-446655440000"
subsequence_id  = "750e8400-e29b-41d4-a716-446655440000"

response = requests.delete(
    f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}",
    headers={"X-API-Key": "your-api-key"}
)

print(response.json())
```



## OpenAPI

````yaml /public_openapi.json delete /api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}
openapi: 3.0.3
info:
  title: ColdSend Public API
  description: >-
    Programmatic access to ColdSend for managing cold email campaigns and sender
    accounts.
  version: 1.0.0
  contact:
    name: ColdSend Support
    email: support@coldsend.pro
    url: https://coldsend.pro
servers:
  - url: https://api.coldsend.pro
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}:
    delete:
      tags:
        - Flow
      summary: Delete a subsequence
      description: >-
        **Delete a subsequence branch**


        Removes the entry edge and every node in the branch. Deleting the last
        branch

        on a campaign sets `subsequences_enabled` back to false, which stops
        branch

        dispatch for that campaign -- MAIN follow-ups are unaffected either way,
        since

        the flag gates branches only.


        Leads already enrolled keep their enrollment rows for reporting, but
        pending

        branch emails are no longer dispatched once the nodes are gone.


        ## Example Usage


        ```python

        import requests


        campaign_id     = "550e8400-e29b-41d4-a716-446655440000"

        subsequence_id  = "750e8400-e29b-41d4-a716-446655440000"


        response = requests.delete(
            f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}",
            headers={"X-API-Key": "your-api-key"}
        )


        print(response.json())

        ```
      operationId: >-
        delete_subsequence_api_public_v1_campaigns__campaign_id__flow_subsequences__subsequence_id__delete
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Campaign Id
        - name: subsequence_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Subsequence Id
      responses:
        '200':
          description: Subsequence deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubsequenceDeleteResponse'
        '400':
          description: Validation failed - see detail message
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'campaigns:update' scope
        '404':
          description: Campaign or subsequence not found in this team
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SubsequenceDeleteResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
      type: object
      required:
        - success
        - message
      title: SubsequenceDeleteResponse
      description: Response when a subsequence is deleted.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with format cs_live_xxx

````

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