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

# Lemlist: Delete Sequences Sequenceid Steps Stepid Branches Branchsequenceid

> Delete Condition Branch. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Delete Condition Branch.

<Info>
  Tool ID: `lemlist_delete_sequences_sequenceid_steps_stepid_branches_branchsequenceid`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'lemlist_delete_sequences_sequenceid_steps_stepid_branches_branchsequenceid',
  {
    "sequenceId": "sequence_123",
    "stepId": "step_123",
    "branchSequenceId": "branch_sequence_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute lemlist_delete_sequences_sequenceid_steps_stepid_branches_branchsequenceid --input '{
  "sequenceId": "sequence_123",
  "stepId": "step_123",
  "branchSequenceId": "branch_sequence_123"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "ok": true,
    "removedSequenceIds": [
      "removed_sequence_123"
    ]
  }
}
```

Use `deepline tools get lemlist_delete_sequences_sequenceid_steps_stepid_branches_branchsequenceid --json` for the latest machine-readable contract.

## Input reference

Removes a branch and the whole sub-tree behind it - the branch's own sub-sequence, and every sequence only reachable through it. `removedSequenceIds` lists what was deleted alongside the branch entry; a sequence another step still points at is left alone. A step keeps at least one branch besides Else, and the Else branch itself is never removable. Removal is refused once leads have entered the campaign, and again while any lead sits anywhere inside the sub-tree.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.sequenceId` | `string` | Yes | — | The unique identifier of the sequence holding the condition step |
| `payload.stepId` | `string` | Yes | — | The unique identifier of the condition step, from `GET /campaigns/&#123;campaignId&#125;/sequences` |
| `payload.branchSequenceId` | `string` | Yes | — | The branch's own sub-sequence id, from `GET /sequences/&#123;sequenceId&#125;/steps/&#123;stepId&#125;/branches`. A branch is never addressed by its position. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Removes a branch and the whole sub-tree behind it - the branch's own sub-sequence, and every sequence only reachable through it. `removedSequenceIds` lists what was deleted alongside the branch entry; a sequence another step still points at is left alone. A step keeps at least one branch besides Else, and the Else branch itself is never removable. Removal is refused once leads have entered the campaign, and again while any lead sits anywhere inside the sub-tree.",
    "properties": {
      "sequenceId": {
        "type": "string",
        "description": "The unique identifier of the sequence holding the condition step"
      },
      "stepId": {
        "type": "string",
        "description": "The unique identifier of the condition step, from `GET /campaigns/{campaignId}/sequences`"
      },
      "branchSequenceId": {
        "type": "string",
        "description": "The branch's own sub-sequence id, from `GET /sequences/{sequenceId}/steps/{stepId}/branches`. A branch is never addressed by its position."
      }
    },
    "required": [
      "sequenceId",
      "stepId",
      "branchSequenceId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.ok` | `boolean` | No | — | — |
| `result.data.removedSequenceIds` | `array` | No | — | The sub-tree sequences deleted with the branch. Empty when the branch held no steps of its own. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "removedSequenceIds": {
            "type": "array",
            "description": "The sub-tree sequences deleted with the branch. Empty when the branch held no steps of its own.",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Lemlist provider guide](/docs/providers/lemlist/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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