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

# Manually move leads to a subsequence

> **Move leads into a subsequence branch by hand**

Enrols the given leads in a branch without waiting for its trigger to fire,
and invalidates their pending MAIN-path follow-ups so they stop receiving the
main chain. Use it to act on a signal ColdSend cannot see -- a call, a
LinkedIn reply, a manual qualification decision.

## Rules

- `target_subsequence_node_id` must be a **SUBSEQUENCE** node; targeting a MAIN
node is rejected with 400. Get node ids from `GET /campaigns/{id}/flow`.
- The campaign must have `subsequences_enabled` true, else 400.
- 1 to 500 lead ids per call; more than 500 is a 422.
- A lead already enrolled in that branch is **skipped**, not re-enrolled and
not an error -- it comes back in `skipped_leads`.
- Leads that do not belong to this campaign are skipped too.

## Response

`success_count` is the number newly enrolled, `skipped_leads` the ids that
were not, and `enrollments` one row per new enrollment with its
`trigger_reason` set to `Manual move via API`.

## Example Usage

```python
import requests

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

response = requests.post(
    f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/leads/move-to-subsequence",
    headers={"X-API-Key": "your-api-key"},
    json={
        "lead_ids": [
            "650e8400-e29b-41d4-a716-446655440000",
            "650e8400-e29b-41d4-a716-446655440001"
        ],
        "target_subsequence_node_id": "850e8400-e29b-41d4-a716-446655440000"
    }
)

print(response.json())
# {"success_count": 2, "skipped_leads": [], "enrollments": [...]}
```



## OpenAPI

````yaml /public_openapi.json post /api/public/v1/campaigns/{campaign_id}/leads/move-to-subsequence
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}/leads/move-to-subsequence:
    post:
      tags:
        - Flow
      summary: Manually move leads to a subsequence
      description: >-
        **Move leads into a subsequence branch by hand**


        Enrols the given leads in a branch without waiting for its trigger to
        fire,

        and invalidates their pending MAIN-path follow-ups so they stop
        receiving the

        main chain. Use it to act on a signal ColdSend cannot see -- a call, a

        LinkedIn reply, a manual qualification decision.


        ## Rules


        - `target_subsequence_node_id` must be a **SUBSEQUENCE** node; targeting
        a MAIN

        node is rejected with 400. Get node ids from `GET /campaigns/{id}/flow`.

        - The campaign must have `subsequences_enabled` true, else 400.

        - 1 to 500 lead ids per call; more than 500 is a 422.

        - A lead already enrolled in that branch is **skipped**, not re-enrolled
        and

        not an error -- it comes back in `skipped_leads`.

        - Leads that do not belong to this campaign are skipped too.


        ## Response


        `success_count` is the number newly enrolled, `skipped_leads` the ids
        that

        were not, and `enrollments` one row per new enrollment with its

        `trigger_reason` set to `Manual move via API`.


        ## Example Usage


        ```python

        import requests


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


        response = requests.post(
            f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/leads/move-to-subsequence",
            headers={"X-API-Key": "your-api-key"},
            json={
                "lead_ids": [
                    "650e8400-e29b-41d4-a716-446655440000",
                    "650e8400-e29b-41d4-a716-446655440001"
                ],
                "target_subsequence_node_id": "850e8400-e29b-41d4-a716-446655440000"
            }
        )


        print(response.json())

        # {"success_count": 2, "skipped_leads": [], "enrollments": [...]}

        ```
      operationId: >-
        move_leads_to_subsequence_api_public_v1_campaigns__campaign_id__leads_move_to_subsequence_post
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Campaign Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManualMoveRequest'
      responses:
        '200':
          description: Move processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManualMoveResponse'
        '400':
          description: >-
            Validation failed - target is not a SUBSEQUENCE node, or
            subsequences are not enabled
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'leads:update' scope
        '404':
          description: Campaign or target node not found in this team
        '422':
          description: lead_ids empty or longer than 500
components:
  schemas:
    ManualMoveRequest:
      properties:
        lead_ids:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 500
          minItems: 1
          title: Lead Ids
          description: Lead IDs to move
        target_subsequence_node_id:
          type: string
          format: uuid
          title: Target Subsequence Node Id
          description: Target SUBSEQUENCE entry node
      type: object
      required:
        - lead_ids
        - target_subsequence_node_id
      title: ManualMoveRequest
      description: Request to manually move leads into a subsequence.
    ManualMoveResponse:
      properties:
        success_count:
          type: integer
          title: Success Count
          description: Number of leads successfully moved
        skipped_leads:
          items:
            type: string
            format: uuid
          type: array
          title: Skipped Leads
          description: Lead IDs that were skipped (already enrolled)
        enrollments:
          items:
            $ref: '#/components/schemas/SubsequenceEnrollmentResponse'
          type: array
          title: Enrollments
      type: object
      required:
        - success_count
      title: ManualMoveResponse
      description: Response for a manual lead move operation.
    SubsequenceEnrollmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        lead_id:
          type: string
          format: uuid
          title: Lead Id
        campaign_id:
          type: string
          format: uuid
          title: Campaign Id
        entry_node_id:
          type: string
          format: uuid
          title: Entry Node Id
        entry_edge_id:
          type: string
          format: uuid
          nullable: true
          title: Entry Edge Id
        trigger_reason:
          type: string
          nullable: true
          title: Trigger Reason
        entered_at:
          type: string
          format: date-time
          title: Entered At
        completed_at:
          type: string
          format: date-time
          nullable: true
          title: Completed At
      type: object
      required:
        - id
        - lead_id
        - campaign_id
        - entry_node_id
        - entered_at
      title: SubsequenceEnrollmentResponse
      description: Response for a subsequence enrollment.
  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.