---
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'
    - `trigger` string
    - `emailCount` number
    - `discountCount` number
    - `subscriberUpdateCount` number
    - `nodeCount` number
    - `enrichmentStatus` string
    - `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
      - `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.
  - `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

## Changes

- **2026-07-18** `09f0c32988fb` — 1 info
  - added the optional property `allOf[#/components/schemas/SequenceCreateResponse]/sequence/stopCondition/matchConfig` to the response with the `200` status
- **2026-07-16** `d7ea66dede72` — 1 breaking, 3 warning, 6 info
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed the optional property `emails` from the response with the `200` status
  - removed the optional property `goal` from the response with the `200` status
  - removed the optional property `success` from the response with the `200` status
  - …6 more
- **2026-04-20** `ed7439559402` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/generate/sequence/post.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/09f0c32988fb/schema)
