---
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.
  - `sendingWindow` SequenceSendingWindow — Optional local-time sending window applied to every email step in a sequence. Email steps that become due outside the window wait until the next allowed local time.
    - `enabled` boolean
    - `timezone` string — IANA timezone for the window.
    - `startTime` string — Earliest local send time in 24-hour HH:mm format.
    - `endTime` string — Latest local send cutoff in 24-hour HH:mm format. Must be later than startTime.
    - `days` string[] — Allowed local days. Omit days when creating or updating to allow every day.
  - `stopCondition` SequenceStopCondition
    - `type` 'none' | 'has_tag' | 'does_not_have_tag' | 'added_to_list' | 'removed_from_list' | 'entered_segment' | 'field_changed' | '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. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
          - `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.
          - `styles` object — Per-block visual styles. For compatibility, style fields such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius can also be supplied at the block top level and are normalized into this object.
            - `paddingTop` number
            - `paddingBottom` number
            - `paddingLeft` number
            - `paddingRight` number
            - `backgroundColor` string
            - `backgroundOpacity` number — Background opacity percentage from 0 to 100.
            - `textColor` string
            - `textAlign` 'left' | 'center' | 'right'
            - `borderRadius` number
            - `borderColor` string
            - `borderWidth` number
        - `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. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
        - `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.
        - `styles` object — Per-block visual styles. For compatibility, style fields such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius can also be supplied at the block top level and are normalized into this object.
          - `paddingTop` number
          - `paddingBottom` number
          - `paddingLeft` number
          - `paddingRight` number
          - `backgroundColor` string
          - `backgroundOpacity` number — Background opacity percentage from 0 to 100.
          - `textColor` string
          - `textAlign` 'left' | 'center' | 'right'
          - `borderRadius` number
          - `borderColor` string
          - `borderWidth` number
      - `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. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
      - `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.
      - `styles` object — Per-block visual styles. For compatibility, style fields such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius can also be supplied at the block top level and are normalized into this object.
        - `paddingTop` number
        - `paddingBottom` number
        - `paddingLeft` number
        - `paddingRight` number
        - `backgroundColor` string
        - `backgroundOpacity` number — Background opacity percentage from 0 to 100.
        - `textColor` string
        - `textAlign` 'left' | 'center' | 'right'
        - `borderRadius` number
        - `borderColor` string
        - `borderWidth` number
    - `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. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
      - `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.
      - `styles` object — Per-block visual styles. For compatibility, style fields such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius can also be supplied at the block top level and are normalized into this object.
        - `paddingTop` number
        - `paddingBottom` number
        - `paddingLeft` number
        - `paddingRight` number
        - `backgroundColor` string
        - `backgroundOpacity` number — Background opacity percentage from 0 to 100.
        - `textColor` string
        - `textAlign` 'left' | 'center' | 'right'
        - `borderRadius` number
        - `borderColor` string
        - `borderWidth` number
    - `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' | 'entered_segment' | 'field_changed' | 'event_received'
      - `value` string, nullable
    - `sendingWindow` SequenceSendingWindow — Optional local-time sending window applied to every email step in a sequence. Email steps that become due outside the window wait until the next allowed local time.
      - `enabled` boolean
      - `timezone` string — IANA timezone for the window.
      - `startTime` string — Earliest local send time in 24-hour HH:mm format.
      - `endTime` string — Latest local send cutoff in 24-hour HH:mm format. Must be later than startTime.
      - `days` string[] — Allowed local days. Omit days when creating or updating to allow every day.
    - `addedBranchNodeId` string
    - `addedBranchPathNodeIds` object

## Other responses

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

## Changes

- **2026-06-17** `b64cd19f80d9` — 2 warning, 2 info
  - added the new `entered_segment` enum value to the `sequence/stopCondition/type` response property for the response status `200`
  - added the new `field_changed` enum value to the `sequence/stopCondition/type` response property for the response status `200`
  - added the new `entered_segment` enum value to the request property `stopCondition/type`
  - added the new `field_changed` enum value to the request property `stopCondition/type`
- **2026-06-17** `8d79cd23ac01` — 2 info
  - added the new optional request property `sendingWindow`
  - added the optional property `sequence/sendingWindow` to the response with the `200` status
- **2026-05-25** `402884feb64a` — 4 info
  - added the new optional request property `branch/branches/items/steps/items/blocks/items/styles/backgroundOpacity`
  - added the new optional request property `branch/elseSteps/items/blocks/items/styles/backgroundOpacity`
  - added the new optional request property `emails/items/blocks/items/styles/backgroundOpacity`
  - added the new optional request property `steps/items/blocks/items/styles/backgroundOpacity`
- …earlier changes not shown

[Full 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/ba95c77d23ef/schema)
