---
title: "Create sequence with steps"
method: POST
path: "/multichannel/workspaces/{workspaceID}/sequences/tree"
tags: ["Sequences"]
---

# Create sequence with steps

`POST /multichannel/workspaces/{workspaceID}/sequences/tree`

## Request

- Base URL: `https://multichannel-api.salesforge.ai/public`
- URL: `https://multichannel-api.salesforge.ai/public/multichannel/workspaces/{workspaceID}/sequences/tree`
- Auth: API key in header `Authorization`

Creates a sequence together with its settings, schedule and whole step tree in one request, instead of creating each node separately.
Steps in a list run one after another. A condition must be the last step of its list; the steps that follow it go in its branches, keyed by branch name (e.g. "yes", "no"). A branch that is left out or empty ends the sequence on that path.
Steps are validated with the same rules as the single node endpoints. If anything is invalid, nothing is created.
The schedule works like the schedule endpoint: a day that is left out is disabled, so list every sending day. Without a schedule the sequence sends Monday to Friday 8 to 18.
Required follow-up conditions (e.g. "request accepted within days" after a LinkedIn connection request) are not added automatically; include them in the tree.

## Path parameters

- `workspaceID` string, required

## Request body

- union
  - object
  - RequestsCreateSequenceTreeRequest
    - `description` string
    - `kind` 'primary' | 'subsequence'
    - `name` string, required
    - `schedule` DtoSchedule
      - `friday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
      - `monday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
      - `saturday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
      - `sunday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
      - `thursday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
      - `tuesday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
      - `wednesday` DtoDaySchedule
        - `enabled` boolean
        - `from` integer
        - `to` integer
    - `settings` RequestsSequenceSettingsInput
      - `bcc` string
      - `bounceShieldEnabled` boolean
      - `cc` string
      - `ccAndBccEnabled` boolean
      - `clickTrackingEnabled` boolean
      - `companyOutreachLimitCount` integer
      - `companyOutreachLimitEnabled` boolean
      - `espMatchingEnabled` boolean
      - `localizedOptOutEnabled` boolean
      - `openTrackingEnabled` boolean
      - `opportunitiesValue` number
      - `optOutLinkEnabled` boolean
      - `optOutLinkText` string
      - `optOutText` string
      - `optOutTextEnabled` boolean
      - `pauseOnClick` boolean
      - `pauseOnOpen` boolean
      - `plainTextEmailsEnabled` boolean
      - `sendingPriority` 'regular' | 'high'
      - `sequentialCompanySendingEnabled` boolean
      - `taskPriorityPolicy` 'new_contacts' | 'followups_first'
      - `trackOpportunitiesEnabled` boolean
    - `steps` RequestsSequenceTreeStepRequest[]
      - `actionId` integer
      - `branches` object
      - `conditionId` integer
      - `distributionStrategy` 'equal' | 'custom'
      - `metadata` RequestsConditionMetadataRequest
        - `allowedValidationStatuses` string[]
      - `ref` string
      - `type` 'action' | 'condition', required
      - `variants` RequestsSequenceTreeVariantRequest[]
        - `exposureInPercentage` integer
        - `isEnabled` boolean
        - `metadata` RequestsSequenceTreeVariantMetadataRequest
          - `message` string
          - `name` string
          - `subject` string
      - `waitInMinutes` integer
    - `timezone` string, required

## Response `201`

Created

- ResponsesCreateSequenceTreeResponse
  - `nodes` ResponsesSequenceTreeNodeResponse[]
    - `actionId` integer
    - `analytics` DtoNodeAnalyticsDTO
      - `active` integer
      - `completed` integer
      - `endValue` integer
      - `failed` integer
    - `branches` ResponsesNodeBranchResponse[]
      - `analytics` DtoBranchAnalyticsDTO
        - `count` integer
        - `percentage` number
      - `description` string
      - `fromNodeId` integer
      - `id` integer
      - `name` string
      - `toNodeId` integer
    - `conditionId` integer
    - `distributionStrategy` string
    - `id` integer
    - `ref` string
    - `sequenceId` integer
    - `type` string
    - `variants` ResponsesNodeVariantResponse[]
      - `exposureInPercentage` number
      - `id` integer
      - `isEnabled` boolean
      - `metadata` ResponsesMetadataResponse
        - `allowedValidationStatuses` string[]
        - `contentSource` 'api' | 'tiptap' | 'agent'
        - `message` string
        - `name` string
        - `subject` string
      - `nodeId` integer
    - `waitInMinutes` integer
    - `waitType` string
  - `sequence` ResponsesCreateSequenceResponse
    - `builderMode` string
    - `description` string
    - `id` integer
    - `kind` string
    - `name` string
    - `settings` ResponsesSequenceSettingsResponse
      - `bcc` string
      - `bounceShieldEnabled` boolean
      - `cc` string
      - `ccAndBccEnabled` boolean
      - `clickTrackingEnabled` boolean
      - `companyOutreachLimitCount` integer
      - `companyOutreachLimitEnabled` boolean
      - `espMatchingEnabled` boolean
      - `localizedOptOutEnabled` boolean
      - `openTrackingEnabled` boolean
      - `opportunitiesValue` number
      - `optOutLinkEnabled` boolean
      - `optOutLinkText` string
      - `optOutText` string
      - `optOutTextEnabled` boolean
      - `pauseOnClick` boolean
      - `pauseOnOpen` boolean
      - `plainTextEmailsEnabled` boolean
      - `sendingPriority` 'regular' | 'high'
      - `sequentialCompanySendingEnabled` boolean
      - `taskPriorityPolicy` 'new_contacts' | 'followups_first'
      - `trackOpportunitiesEnabled` boolean
    - `status` string
    - `timezone` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error

---

[API](https://skmtc.dev/salesforge/apis/multichannel-public-api.md) - [All operations](https://skmtc.dev/salesforge/apis/multichannel-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/salesforge/apis/multichannel-public-api/revisions/f4dc28ed447d?raw)
