Sequences
Create sequence
Changed onCreates 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 URLhttps://api.sequenzy.com/api/v1
- URLhttps://api.sequenzy.com/api/v1/sequences
- AuthHTTP bearer
Request body
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
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
- info
added the new optional request property
- info
added the optional property
/to the response with the status
- info