---
title: "Update sequence"
method: PUT
path: "/sequences/{sequenceId}"
tags: ["Sequences"]
---

# Update sequence

`PUT /sequences/{sequenceId}`

Updates a sequence name, stop condition, branch logic, or existing sequence email steps.

## Path parameters

- `sequenceId` string, required

## Request body

- SequenceUpdateRequest
  - `name` string — Updated sequence name.
  - `enrollmentMode` 'unlimited' | 'one_time' | 'matching_field' — Controls sequence re-entry. `unlimited` allows re-entry after completion but prevents concurrent active runs. `one_time` allows one enrollment ever. `matching_field` is only valid for event-triggered sequences and allows concurrent active runs only when the trigger payload resolves to a different event field value.
  - `enrollmentFieldPath` string, nullable — Dot-path event property used by matching_field enrollment on event-based sequences. Set to null to use built-in defaults.
  - `stopCondition` SequenceStopCondition
    - `type` 'none' | 'has_tag' | 'does_not_have_tag' | 'added_to_list' | 'removed_from_list' | 'event_received'
    - `value` string, nullable
  - `branch` SequenceBranchInput
    - `afterNodeId` string, required — Existing sequence node ID to insert the branch after.
    - `label` string
    - `branches` SequenceBranchConditionInput[], required — Conditional branches evaluated in order. Each branch should include steps unless allowEmptyPaths is true.
      - `id` string — Optional stable branch ID. Defaults to branch-0, branch-1, etc.
      - `label` string
      - `conditionType` 'has_tag' | 'in_list' | 'in_segment' | 'event_received' | 'link_clicked' | 'field_equals' | 'field_contains' | 'field_greater_than' | 'field_less_than', required
      - `tagId` string — Tag ID or tag name for has_tag conditions.
      - `tagName` string — Tag name for has_tag conditions.
      - `listId` string — List ID for in_list conditions.
      - `segmentId` string — Segment ID for in_segment conditions.
      - `segmentName` string — Optional display name for in_segment conditions.
      - `eventName` string — Event name for event_received conditions.
      - `linkUrl` string — Optional URL substring for link_clicked conditions. Omit to match any clicked link.
      - `activityScope` 'ever' | 'this_sequence' | 'previous_email' — Scope for event_received and link_clicked conditions.
      - `fieldName` string — Subscriber attribute name for field conditions.
      - `fieldValue` string — Comparison value for field conditions.
      - `steps` SequenceBranchPathStepInput[] — Steps to create in this branch path. Required by default so the path is not an empty placeholder.
        - `type` 'email' | 'delay' | 'create_discount' | 'discount' | 'webhook' — Step type. Omit for email steps, or use delay for a standalone wait.
        - `nodeType` 'logic_delay' | 'action_email' | 'action_create_discount' | 'action_add_tag' | 'action_remove_tag' | 'action_add_to_list' | 'action_remove_from_list' | 'action_update_attributes' | 'logic_wait_for_event' | 'action_webhook' — Advanced node type for non-email branch path actions.
        - `config` object — Config for advanced nodeType steps.
        - `subject` string — Email subject. Required for email steps.
        - `previewText` string, nullable — Email preview text.
        - `blocks` EmailBlock[] — Email blocks for email steps.
          - `id` string
          - `type` 'text' | 'html' | 'heading' | 'list' | 'button' | 'spacer' | 'divider' | 'image' | 'columns' | 'conditional-group' | 'card' | 'cta' | 'social' | 'logo' | 'footer' | 'video' | 'product', required
          - `content` string — Content for text, html, and heading-like blocks.
        - `html` string — HTML content for email steps.
        - `delay` SequenceDelayInput — Delay before this step runs.
          - `days` number
          - `hours` number
          - `minutes` number
        - `delayMs` number — Delay in milliseconds. Useful for standalone delay steps.
        - `name` string — Email template name for email steps.
        - `discount` object — Discount configuration for create_discount steps.
    - `elseSteps` SequenceBranchPathStepInput[] — Steps to create in the else fallback path. Required by default unless allowEmptyPaths is true.
      - `type` 'email' | 'delay' | 'create_discount' | 'discount' | 'webhook' — Step type. Omit for email steps, or use delay for a standalone wait.
      - `nodeType` 'logic_delay' | 'action_email' | 'action_create_discount' | 'action_add_tag' | 'action_remove_tag' | 'action_add_to_list' | 'action_remove_from_list' | 'action_update_attributes' | 'logic_wait_for_event' | 'action_webhook' — Advanced node type for non-email branch path actions.
      - `config` object — Config for advanced nodeType steps.
      - `subject` string — Email subject. Required for email steps.
      - `previewText` string, nullable — Email preview text.
      - `blocks` EmailBlock[] — Email blocks for email steps.
        - `id` string
        - `type` 'text' | 'html' | 'heading' | 'list' | 'button' | 'spacer' | 'divider' | 'image' | 'columns' | 'conditional-group' | 'card' | 'cta' | 'social' | 'logo' | 'footer' | 'video' | 'product', required
        - `content` string — Content for text, html, and heading-like blocks.
      - `html` string — HTML content for email steps.
      - `delay` SequenceDelayInput — Delay before this step runs.
        - `days` number
        - `hours` number
        - `minutes` number
      - `delayMs` number — Delay in milliseconds. Useful for standalone delay steps.
      - `name` string — Email template name for email steps.
      - `discount` object — Discount configuration for create_discount steps.
    - `allowEmptyPaths` boolean — Set true only when intentionally creating empty UI placeholders.
  - `emails` SequenceEmailUpdateInput[] — Email step updates. Provide either emails or steps.
    - `emailId` string — Email template ID to update. You can also pass the node ID here for compatibility.
    - `nodeId` string — Sequence email node ID to update.
    - `name` string — Updated step and email template name.
    - `subject` string — Updated subject line.
    - `previewText` string, nullable — Updated preview text.
    - `blocks` EmailBlock[] — Replacement Sequenzy email blocks.
      - `id` string
      - `type` 'text' | 'html' | 'heading' | 'list' | 'button' | 'spacer' | 'divider' | 'image' | 'columns' | 'conditional-group' | 'card' | 'cta' | 'social' | 'logo' | 'footer' | 'video' | 'product', required
      - `content` string — Content for text, html, and heading-like blocks.
    - `html` string — HTML content to convert into blocks. Provide html/htmlContent or blocks.
    - `htmlContent` string — Alias for html.
  - `steps` SequenceEmailUpdateInput[] — Alias for emails.
    - `emailId` string — Email template ID to update. You can also pass the node ID here for compatibility.
    - `nodeId` string — Sequence email node ID to update.
    - `name` string — Updated step and email template name.
    - `subject` string — Updated subject line.
    - `previewText` string, nullable — Updated preview text.
    - `blocks` EmailBlock[] — Replacement Sequenzy email blocks.
      - `id` string
      - `type` 'text' | 'html' | 'heading' | 'list' | 'button' | 'spacer' | 'divider' | 'image' | 'columns' | 'conditional-group' | 'card' | 'cta' | 'social' | 'logo' | 'footer' | 'video' | 'product', required
      - `content` string — Content for text, html, and heading-like blocks.
    - `html` string — HTML content to convert into blocks. Provide html/htmlContent or blocks.
    - `htmlContent` string — Alias for html.

## Response `200`

Sequence updated successfully

- object
  - `success` boolean
  - `sequence` object
    - `id` string
    - `name` string
    - `status` 'draft' | 'active' | 'paused' | 'archived'
    - `updatedEmailCount` number
    - `stopCondition` SequenceStopCondition
      - `type` 'none' | 'has_tag' | 'does_not_have_tag' | 'added_to_list' | 'removed_from_list' | 'event_received'
      - `value` string, nullable
    - `addedBranchNodeId` string
    - `addedBranchPathNodeIds` object

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — No company selected
- `404` — Sequence not found

## Changes

- **2026-05-05** `5449b620579f` — 8 info
  - added the new optional request property `branch/branches/items/activityScope`
  - added the new optional request property `branch/branches/items/eventName`
  - added the new optional request property `branch/branches/items/linkUrl`
  - added the new optional request property `branch/branches/items/segmentId`
  - …4 more
- **2026-04-27** `7b3caee33967` — 4 info
  - added the new optional request property `branch/allowEmptyPaths`
  - added the new optional request property `branch/branches/items/steps`
  - added the new optional request property `branch/elseSteps`
  - added the optional property `sequence/addedBranchPathNodeIds` to the response with the `200` status
- **2026-04-27** `97fc1deb5949` — 6 info
  - added the new optional request property `branch`
  - added the new optional request property `enrollmentFieldPath`
  - added the new optional request property `enrollmentMode`
  - added the new optional request property `stopCondition`
  - …2 more
- **2026-04-20** `ed7439559402` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/sequences/:sequenceId/put.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/b040bb8c6608/schema)
