Sequences

Creates a draft automation sequence using AI-generated content, explicit email/action steps, or a blank trigger-to-completion graph when both are omitted. Discount action steps dynamically generate Stripe or Shopify codes that later emails can reference with discount merge tags. Marketer account keys must choose existing sender and Reply-To profiles; requests requiring new profiles return 400 before creating profiles, labels, or campaign/sequence changes, including nested steps and branches.

post/sequences

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/sequences
  • Auth
    HTTP bearer

Request body

descriptionstring

Optional dashboard description.

userCancellableboolean

Whether recipients can cancel this sequence from email preferences.

activeSubscribersOnlyboolean

Only enroll contacts whose status is active. Defaults to false: unsubscribed and bounced contacts still enter on tag, event, list and contact triggers so non-marketing steps run for them, and their marketing emails are skipped at send time. Pending double opt-in contacts still wait for confirmation.

labelsstring[]

Dashboard label names. Missing labels are created.

bccEmailsstring[] nullable

Addresses blind-copied on every sequence email.

fromEmailstring email

From address for every email in this sequence. Its domain must be configured and verified.

fromNamestring

Display name recipients see, e.g. 'Brennon at TradeTally'. Selects the sender identity of that name on fromEmail, creating it when the address has no identity by that name; the mailbox's other display names, and everything pinned to them, are untouched. Requires fromEmail; omit it when using senderProfileId, which already carries its own display name.

senderProfileIdstring

Existing sender profile ID. It already supplies both the From address and display name, so send it on its own and omit fromEmail and fromName. To keep this profile under a different display name, set fromName on the email steps instead, where it is a per-step override.

replyTostring email

Reply-To address for every email in this sequence. A profile is created when needed.

replyToNamestring

Display name for the Reply-To address. Requires replyTo; omit it when using replyProfileId, which already carries its own display name. An address carries one Reply-To name company-wide, so if replyTo already has a saved profile under a different name, that saved name is kept and the response warnings array says so.

replyProfileIdstring

Existing reply profile ID. It already supplies both the Reply-To address and display name, so send it on its own and omit replyTo and replyToName.

namestring required
trigger'contact_added' | 'tag_added' | 'segment_entered' | 'segment_exited' | 'event_received' | 'inbound_webhook' | 'inactivity' | 'frequency' | 'manual'

How contacts enter the sequence. segment_exited enrolls active contacts who stop matching the segment; unsubscribing or bouncing does not count as leaving. manual never enrolls anyone automatically; use it with key dates for one-time countdown campaigns and enroll the audience with the enroll-audience endpoint.

listIdstring

List ID for contact_added triggers. Omit it to use listScope instead. Use listIds to trigger on several lists.

listIdsstring[]

Several list IDs for a contact_added trigger. A contact joining ANY of them enrolls. Takes precedence over listId when both are sent. Cannot be combined with listScope.

listScope'any_contact' | 'any_list'

For contact_added triggers with no list at all. any_contact (the default) enrolls every contact added, including contacts that join no list - which is what integrations create when list targeting is empty. any_list waits until the contact joins a list. Cannot be combined with listId or listIds.

tagNamestring

Tag name for tag_added triggers. Use tagNames to trigger on several tags.

tagNamesstring[]

Several tag names for a tag_added trigger. Receiving ANY of them enrolls the contact. Takes precedence over tagName when both are sent.

segmentIdstring

Segment ID for segment_entered and segment_exited triggers.

stopOnSegmentExitboolean

For segment_entered triggers, cancel enrollment when the subscriber leaves the segment.

eventNamestring

Event name for event_received, inbound_webhook, inactivity, and frequency triggers.

integrationSlugstring

Integration slug for inbound_webhook triggers.

integrationEventKeystring

Integration event key for inbound_webhook triggers.

customIntegrationobject

Custom inbound-webhook integration metadata.

inactiveDaysnumber

Days of inactivity before the sequence starts.

inactivityBaseline'sequence_created_at' | 'subscriber_created_at'

For inactivity triggers, controls when to start counting for subscribers who have never performed the event. Defaults to sequence_created_at.

minCountnumber

Minimum event count for frequency triggers.

timeWindowDaysnumber

Time window in days for frequency triggers.

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.

enrollmentFieldPathstring

Scalar dot-path event property used by matching_field enrollment, such as order.id or product.providerVariantId. Array traversal with [] is not supported; use propertyFilters for array matching. Applies to event_received and inbound_webhook triggers. Leave empty for built-in Shopify product/variant defaults.

frequencyCapEnabledboolean

Whether the sequence respects the company frequency cap (/frequency-cap). When true, an email step is skipped for a contact who already received the cap's number of campaign or marketing sequence emails in its window, and the contact continues to the next step. Transactional steps are never skipped and transactional emails never count. Has no effect until a cap is set.

emailCountnumber

Number of emails for AI-generated content. Defaults to 5. Maximum is 10.

durationDaysnumber

Total duration in days used to space AI-generated emails. Omit this to use the default sequence delay schedule.

emailStyle'visual' | 'plain'

Style for the AI-generated emails: visual (designed, with heroes/imagery/rich sections) or plain (personal, text-first notes with a single button). Defaults to the company's saved preference when omitted.

goalstring

Goal for AI-generated sequence content. Provide either goal or steps, or omit both for a blank dashboard-compatible draft.

Example request

{
  "name": "Welcome Sequence",
  "listId": "list_abc123",
  "listIds": [
    "list_abc123",
    "list_def456"
  ],
  "listScope": "any_list",
  "tagName": "trial",
  "tagNames": [
    "trial",
    "vip"
  ],
  "segmentId": "seg_abc123",
  "eventName": "onboarding.started",
  "propertyFilters": [
    {
      "path": "lineItems[].providerProductId",
      "operator": "equals"
    }
  ],
  "inactiveDays": 14,
  "inactivityBaseline": "sequence_created_at",
  "minCount": 3,
  "timeWindowDays": 7,
  "enrollmentFieldPath": "order.id",
  "sendingWindow": {
    "enabled": true,
    "timezone": "Europe/Kiev",
    "startTime": "08:00",
    "endTime": "20:00",
    "days": [
      "monday",
      "tuesday",
      "wednesday",
      "thursday",
      "friday"
    ]
  },
  "keyDates": {
    "timezone": "America/New_York",
    "dates": [
      {
        "key": "black_friday_starts",
        "label": "Black Friday starts",
        "at": "2026-11-27T05:00:00.000Z"
      }
    ]
  },
  "emailCount": 5,
  "durationDays": 14,
  "emailStyle": "visual",
  "goal": "Welcome new users and help them reach activation.",
  "stopCondition": {
    "value": "saas.purchase",
    "matchConfig": {
      "propertyFilters": [
        {
          "path": "quota_used"
        }
      ]
    }
  },
  "steps": [
    {
      "type": "create_discount",
      "subject": "Welcome to Acme",
      "previewText": "Here is what to do next",
      "text": "Hey {{FIRST_NAME}}, your order shipped!",
      "title": "Welcome aboard",
      "body": "Hi {{FIRST_NAME|there}}, tap to finish setup.",
      "blocks": [
        {
          "id": "block_123",
          "type": "html",
          "content": "<h1>Hello</h1>",
          "styles": {
            "backgroundColor": "#f8fafc",
            "backgroundOpacity": 80,
            "textColor": "#111827",
            "borderRadius": 12,
            "borderColor": "#cbd5e1",
            "borderWidth": 1
          },
          "conditions": [
            {
              "id": "c1",
              "value": "plan:pro"
            }
          ]
        }
      ],
      "html": "<h1>Welcome</h1><p>Thanks for joining.</p>",
      "attachments": [
        {
          "filename": "guide.pdf",
          "path": "https://example.com/files/guide.pdf"
        }
      ],
      "delay": {
        "mode": "until_date",
        "untilKeyDate": "black_friday_starts",
        "keyDate": "black_friday_starts",
        "untilPastAction": "skip",
        "pastAction": "skip",
        "days": 1,
        "hours": 2,
        "minutes": 30,
        "untilDateField": "renews_at",
        "field": "subscription.renews_at",
        "untilDateSource": "attribute",
        "source": "attribute",
        "untilOffsetDirection": "before",
        "direction": "before",
        "untilMissingAction": "exit",
        "missingAction": "exit",
        "untilDays": [
          "sunday"
        ],
        "untilStartTime": "09:00",
        "untilEndTime": "12:00",
        "untilTimezone": "America/Los_Angeles",
        "untilTimezoneSource": "subscriber"
      },
      "waitUntil": {
        "field": "renews_at",
        "untilDateField": "subscription.renews_at",
        "source": "attribute",
        "untilDateSource": "attribute",
        "offset": {
          "days": 1,
          "hours": 2,
          "minutes": 30
        },
        "days": 1,
        "hours": 2,
        "minutes": 30,
        "direction": "before",
        "untilOffsetDirection": "before",
        "missingAction": "exit",
        "untilMissingAction": "exit",
        "pastAction": "skip",
        "untilPastAction": "skip"
      },
      "waitUntilWeekday": {
        "day": "sunday",
        "days": [
          "sunday"
        ],
        "startTime": "09:00",
        "untilStartTime": "09:00",
        "endTime": "12:00",
        "untilEndTime": "12:00",
        "timezone": "America/Los_Angeles",
        "untilTimezone": "America/Los_Angeles",
        "timezoneSource": "subscriber",
        "untilTimezoneSource": "subscriber",
        "minimumWait": {
          "days": 6
        }
      },
      "waitUntilKeyDate": {
        "key": "black_friday_starts",
        "untilKeyDate": "black_friday_starts",
        "offset": {
          "days": 1,
          "hours": 2,
          "minutes": 30
        },
        "days": 7,
        "direction": "before",
        "untilOffsetDirection": "before",
        "pastAction": "skip",
        "untilPastAction": "skip",
        "missingAction": "exit",
        "untilMissingAction": "exit"
      },
      "delayMs": 86400000,
      "name": "Welcome Sequence - Email 1",
      "discount": {
        "label": "Create win-back discount",
        "provider": "stripe",
        "discountType": "percent",
        "percentOff": 20,
        "amountOff": 500,
        "currency": "usd",
        "duration": "once",
        "durationInMonths": 3,
        "appliesToAllPlans": true,
        "planIds": [
          "prod_abc123"
        ],
        "codePrefix": "SAVE",
        "maxRedemptions": 1,
        "lockToSubscriber": true,
        "expiresAt": "2026-12-31",
        "expiresInHours": 48,
        "name": "Win-back coupon"
      },
      "label": "Create win-back discount",
      "provider": "stripe",
      "discountType": "percent",
      "percentOff": 20,
      "amountOff": 500,
      "currency": "usd",
      "duration": "once",
      "durationInMonths": 3,
      "appliesToAllPlans": true,
      "planIds": [
        "prod_abc123"
      ],
      "codePrefix": "SAVE",
      "maxRedemptions": 1,
      "lockToSubscriber": true,
      "expiresAt": "2026-12-31",
      "expiresInHours": 48
    }
  ]
}

Response

Sequence created successfully

successboolean
messagestring
warningsstring[]

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.

eventTrackingCodestring

Code snippet returned for custom event triggers.

requiredEventsstring[]

Example response

{
  "success": true,
  "message": "Sequence created with 2 emails and 1 discount action. Use POST /api/v1/sequences/{id}/enable to activate.",
  "sequence": {
    "id": "seq_abc123",
    "name": "Welcome Sequence",
    "trigger": "trigger_list",
    "emailCount": 2,
    "discountCount": 1,
    "subscriberUpdateCount": 1,
    "nodeCount": 5,
    "enrichmentStatus": "processing",
    "stopCondition": {
      "value": "saas.purchase",
      "matchConfig": {
        "propertyFilters": [
          {
            "path": "quota_used"
          }
        ]
      }
    },
    "sendingWindow": {
      "enabled": true,
      "timezone": "Europe/Kiev",
      "startTime": "08:00",
      "endTime": "20:00",
      "days": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday"
      ]
    },
    "keyDates": {
      "timezone": "America/New_York",
      "dates": [
        {
          "key": "black_friday_starts",
          "label": "Black Friday starts",
          "at": "2026-11-27T05:00:00.000Z"
        }
      ]
    }
  },
  "warnings": [
    "blocks[0].styles.color is not a supported field and was ignored. Button label color comes from the block-level `buttonTextColor` field. Supported styles fields: backgroundColor, backgroundOpacity, bleed, borderColor, borderRadius, borderWidth, keepAlign, paddingBottom, paddingLeft, paddingRight, paddingTop, textAlign, textColor."
  ],
  "eventTracking": {
    "endpoint": "https://api.sequenzy.com/api/v1/subscribers/events",
    "method": "POST",
    "docsUrl": "https://docs.sequenzy.com/api-reference/subscribers/events/trigger",
    "integrationGuide": {
      "tool": "get_integration_guide",
      "arguments": {
        "use_case": "event_tracking"
      }
    },
    "payloadContract": {
      "propertyFilters": [
        {
          "path": "lineItems[].providerProductId",
          "operator": "equals"
        }
      ]
    },
    "examplePayload": {
      "email": "user@example.com",
      "event": "trial.started",
      "properties": {
        "trial_id": "<trial_id>"
      }
    },
    "examplePayloadMatchesFilters": true
  }
}

Changes

    • info

      added the new optional request property /////

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status