---
title: "Generate sequence (deprecated)"
method: POST
path: "/generate/sequence"
tags: ["Sequences"]
deprecated: true
---

# Generate sequence (deprecated)

`POST /generate/sequence`

> **Deprecated.**

Deprecated compatibility alias that creates and persists a disabled contact_added sequence draft from a goal. Use POST /sequences for new integrations.

## Request body

- object
  - `goal` string, required — Sequence goal or desired subscriber journey.
  - `name` string — Optional sequence name. Defaults to the normalized goal.
  - `listId` string — Optional list ID that scopes the contact_added trigger.
  - `emailCount` number — Number of emails to generate. Defaults to 5. Maximum is 10.
  - `durationDays` number — Duration used to space suggested delays. Defaults to 14.

## Response `200`

Disabled sequence draft created successfully

- object
  - `success` boolean
  - `message` string
  - `sequence` object
    - `id` string
    - `name` string
    - `status` 'draft' | 'active' | 'paused' | 'archived' — Stored lifecycle status. Do not read literally: a sequence can be active while enrollmentPaused blocks new subscribers. Branch on effectiveStatus instead.
    - `enrollmentPaused` boolean — Whether new enrollments are paused while current recipients continue.
    - `effectiveStatus` 'draft' | 'live' | 'enrollment_paused' | 'paused' | 'archived' — Resolved run state, and the single field to branch on. live accepts new subscribers and advances existing recipients; enrollment_paused advances existing recipients only; draft, paused, and archived do neither.
    - `acceptsNewEnrollments` boolean — Whether new subscribers can enter the sequence right now.
    - `processesExistingEnrollments` boolean — Whether subscribers already inside the sequence keep advancing and receiving steps.
    - `effectiveStatusSummary` string — One plain-language sentence describing the run state, safe to show a user verbatim.
    - `trigger` string
    - `emailCount` number
    - `discountCount` number
    - `subscriberUpdateCount` number
    - `nodeCount` number
    - `enrichmentStatus` string
    - `stopCondition` SequenceStopCondition — Auto-stop condition, re-evaluated before every step including the first one. has_tag, added_to_list, entered_segment, field_changed, and event_received stop the run once the thing happens. does_not_have_tag and removed_from_list stop the run whenever the subscriber lacks that tag or list membership, so they act as a required-tag or required-list allowlist and cancel everyone else before any step sends. Guarded-out contacts still enroll and are then cancelled at the trigger node, so they appear as cancellations there rather than in the active or waiting enrollment counts. Clearing the guard does not retry them: they only receive the sequence if the trigger fires for them again, and on the one_time enrollment mode not even then.
      - `type` 'none' | 'has_tag' | 'does_not_have_tag' | 'added_to_list' | 'removed_from_list' | 'entered_segment' | 'field_changed' | 'event_received'
      - `value` string, nullable — Tag name, list ID, segment ID, field path, or event name. For the does_not_have_tag and removed_from_list guards this is the tag or list a subscriber must have to keep receiving the sequence.
      - `matchConfig` union — Optional typed match rule. event_received uses event_property rules; field_changed uses a field_value comparison.
        - object
          - `mode` 'event_property', required
          - `rules` object[], required
            - `entryFieldPath` string, required
            - `eventFieldPath` string, required
        - object
          - `mode` 'field_value', required
          - `operator` 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains', required
          - `value` string, required
    - `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.
  - `warnings` string[] — Non-blocking advisories about a successful write. Present when an input was discarded or did not take effect as requested. This includes block fields that do not render as their names suggest, sequence email-step formatting restored on top of submitted blocks, and sender-identity conflicts such as a replyToName that differs from the saved profile. Each message identifies the affected input and gives recovery guidance. Absent when there is nothing to report.
  - `eventTrackingCode` string — Code snippet returned for custom event triggers.
  - `eventTracking` object — Endpoint, payload contract, example, documentation, and integration-guide pointer returned for custom event triggers.
    - `endpoint` string
    - `method` string
    - `docsUrl` string
    - `integrationGuide` object
      - `tool` string
      - `arguments` object
    - `payloadContract` object
      - `required` string[]
      - `identity` string
      - `event` string
      - `properties` string
      - `requiredPropertyPaths` string[]
      - `propertyFilters` SequenceTriggerPropertyFilter[] — Normalized trigger filters that the event properties must satisfy before the sequence can enroll the subscriber.
        - `path` string, required — Dot-path into the event properties. Use [] to match items inside arrays.
        - `operator` 'exists' | 'not_exists' | 'equals' | 'not_equals' | 'one_of' | 'contains' | 'greater_than' | 'less_than', required — Comparison operator. Value is required for every operator except exists and not_exists. `one_of` matches when the property equals any entry of the value array.
        - `value` union — Value to compare against. For `one_of`, pass a non-empty array of strings or numbers (maximum 50 values); all other operators take a single value.
          - string
          - number
          - boolean
          - union[]
            - union
              - …
    - `examplePayload` object
    - `examplePayloadMatchesFilters` boolean — Whether examplePayload already satisfies every normalized property filter. When false, adapt properties using payloadContract before sending the sample.
    - `examplePayloadNote` string — Present when the generated example needs manual property adaptation before it satisfies every filter.
  - `requiredEvents` string[]
  - `deprecated` true
  - `deprecationMessage` string

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — No company selected
- `500` — Sequence creation failed

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
