Sequences
Create Sequence
Create an automation sequence with AI-generated or explicit email/action steps
POST
/
api
/
v1
/
sequences
Create Sequence
curl --request POST \
--url https://api.sequenzy.com/api/v1/sequences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"labels": [
"<string>"
],
"userCancellable": true,
"activeSubscribersOnly": true,
"bccEmails": [
"<string>"
],
"trigger": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"senderProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"replyProfileId": "<string>",
"listId": "<string>",
"listIds": [
"<string>"
],
"listScope": "<string>",
"tagName": "<string>",
"tagNames": [
"<string>"
],
"segmentId": "<string>",
"stopOnSegmentExit": true,
"eventName": "<string>",
"integrationSlug": "<string>",
"integrationEventKey": "<string>",
"customIntegration": {},
"propertyFilters": [
{
"path": "<string>",
"operator": "<string>",
"value": {}
}
],
"inactiveDays": 123,
"inactivityBaseline": "<string>",
"minCount": 123,
"timeWindowDays": 123,
"enrollmentMode": "<string>",
"enrollmentFieldPath": "<string>",
"sendingWindow": {
"enabled": true,
"timezone": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"days": [
{}
]
},
"frequencyCapEnabled": true,
"keyDates": {
"timezone": "<string>",
"dates": [
{}
]
},
"stopCondition": {},
"goal": "<string>",
"emailCount": 123,
"durationDays": 123,
"emailStyle": "<string>",
"steps": [
{
"type": "<string>",
"nodeType": "<string>",
"config": {},
"subject": "<string>",
"text": "<string>",
"imageUrls": [
{}
],
"title": "<string>",
"body": "<string>",
"url": {},
"imageUrl": {},
"iconUrl": {},
"platforms": [
"<string>"
],
"ineligibleAction": "<string>",
"kind": "<string>",
"format": "<string>",
"position": "<string>",
"eyebrow": "<string>",
"imagePlacement": "<string>",
"buttons": [
{}
],
"data": {},
"expiresAfterDays": {},
"pinned": true,
"style": {},
"label": "<string>",
"previewText": "<string>",
"isTransactional": true,
"senderProfileId": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"replyProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"ccEmails": [
"<string>"
],
"bccEmails": [
"<string>"
],
"attachments": [
{}
],
"blocks": [
{}
],
"html": "<string>",
"delay": {
"mode": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"untilDateField": "<string>",
"untilDateSource": "<string>",
"untilOffsetDirection": "<string>",
"untilMissingAction": "<string>",
"untilPastAction": "<string>"
},
"waitUntil": {
"field": "<string>",
"source": "<string>",
"offset": {},
"direction": "<string>",
"missingAction": "<string>",
"pastAction": "<string>"
},
"waitUntilWeekday": {
"day": "<string>",
"days": [
{}
],
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"timezoneSource": "<string>",
"minimumWait": {}
},
"waitUntilKeyDate": {
"key": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"direction": "<string>",
"pastAction": "<string>",
"missingAction": "<string>"
},
"delayMs": 123,
"name": "<string>",
"discount": {
"label": "<string>",
"provider": "<string>",
"discountType": "<string>",
"percentOff": 123,
"amountOff": 123,
"currency": "<string>",
"duration": "<string>",
"durationInMonths": 123,
"appliesToAllPlans": true,
"planIds": [
{}
],
"codePrefix": "<string>",
"maxRedemptions": 123,
"lockToSubscriber": true,
"expiresAt": "<string>",
"expiresInHours": 123,
"name": "<string>"
}
}
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/sequences"
payload = {
"name": "<string>",
"description": "<string>",
"labels": ["<string>"],
"userCancellable": True,
"activeSubscribersOnly": True,
"bccEmails": ["<string>"],
"trigger": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"senderProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"replyProfileId": "<string>",
"listId": "<string>",
"listIds": ["<string>"],
"listScope": "<string>",
"tagName": "<string>",
"tagNames": ["<string>"],
"segmentId": "<string>",
"stopOnSegmentExit": True,
"eventName": "<string>",
"integrationSlug": "<string>",
"integrationEventKey": "<string>",
"customIntegration": {},
"propertyFilters": [
{
"path": "<string>",
"operator": "<string>",
"value": {}
}
],
"inactiveDays": 123,
"inactivityBaseline": "<string>",
"minCount": 123,
"timeWindowDays": 123,
"enrollmentMode": "<string>",
"enrollmentFieldPath": "<string>",
"sendingWindow": {
"enabled": True,
"timezone": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"days": [{}]
},
"frequencyCapEnabled": True,
"keyDates": {
"timezone": "<string>",
"dates": [{}]
},
"stopCondition": {},
"goal": "<string>",
"emailCount": 123,
"durationDays": 123,
"emailStyle": "<string>",
"steps": [
{
"type": "<string>",
"nodeType": "<string>",
"config": {},
"subject": "<string>",
"text": "<string>",
"imageUrls": [{}],
"title": "<string>",
"body": "<string>",
"url": {},
"imageUrl": {},
"iconUrl": {},
"platforms": ["<string>"],
"ineligibleAction": "<string>",
"kind": "<string>",
"format": "<string>",
"position": "<string>",
"eyebrow": "<string>",
"imagePlacement": "<string>",
"buttons": [{}],
"data": {},
"expiresAfterDays": {},
"pinned": True,
"style": {},
"label": "<string>",
"previewText": "<string>",
"isTransactional": True,
"senderProfileId": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"replyProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"ccEmails": ["<string>"],
"bccEmails": ["<string>"],
"attachments": [{}],
"blocks": [{}],
"html": "<string>",
"delay": {
"mode": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"untilDateField": "<string>",
"untilDateSource": "<string>",
"untilOffsetDirection": "<string>",
"untilMissingAction": "<string>",
"untilPastAction": "<string>"
},
"waitUntil": {
"field": "<string>",
"source": "<string>",
"offset": {},
"direction": "<string>",
"missingAction": "<string>",
"pastAction": "<string>"
},
"waitUntilWeekday": {
"day": "<string>",
"days": [{}],
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"timezoneSource": "<string>",
"minimumWait": {}
},
"waitUntilKeyDate": {
"key": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"direction": "<string>",
"pastAction": "<string>",
"missingAction": "<string>"
},
"delayMs": 123,
"name": "<string>",
"discount": {
"label": "<string>",
"provider": "<string>",
"discountType": "<string>",
"percentOff": 123,
"amountOff": 123,
"currency": "<string>",
"duration": "<string>",
"durationInMonths": 123,
"appliesToAllPlans": True,
"planIds": [{}],
"codePrefix": "<string>",
"maxRedemptions": 123,
"lockToSubscriber": True,
"expiresAt": "<string>",
"expiresInHours": 123,
"name": "<string>"
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
labels: ['<string>'],
userCancellable: true,
activeSubscribersOnly: true,
bccEmails: ['<string>'],
trigger: '<string>',
fromEmail: '<string>',
fromName: '<string>',
senderProfileId: '<string>',
replyTo: '<string>',
replyToName: '<string>',
replyProfileId: '<string>',
listId: '<string>',
listIds: ['<string>'],
listScope: '<string>',
tagName: '<string>',
tagNames: ['<string>'],
segmentId: '<string>',
stopOnSegmentExit: true,
eventName: '<string>',
integrationSlug: '<string>',
integrationEventKey: '<string>',
customIntegration: {},
propertyFilters: [{path: '<string>', operator: '<string>', value: {}}],
inactiveDays: 123,
inactivityBaseline: '<string>',
minCount: 123,
timeWindowDays: 123,
enrollmentMode: '<string>',
enrollmentFieldPath: '<string>',
sendingWindow: {
enabled: true,
timezone: '<string>',
startTime: '<string>',
endTime: '<string>',
days: [{}]
},
frequencyCapEnabled: true,
keyDates: {timezone: '<string>', dates: [{}]},
stopCondition: {},
goal: '<string>',
emailCount: 123,
durationDays: 123,
emailStyle: '<string>',
steps: [
{
type: '<string>',
nodeType: '<string>',
config: {},
subject: '<string>',
text: '<string>',
imageUrls: [{}],
title: '<string>',
body: JSON.stringify('<string>'),
url: {},
imageUrl: {},
iconUrl: {},
platforms: ['<string>'],
ineligibleAction: '<string>',
kind: '<string>',
format: '<string>',
position: '<string>',
eyebrow: '<string>',
imagePlacement: '<string>',
buttons: [{}],
data: {},
expiresAfterDays: {},
pinned: true,
style: {},
label: '<string>',
previewText: '<string>',
isTransactional: true,
senderProfileId: '<string>',
fromEmail: '<string>',
fromName: '<string>',
replyProfileId: '<string>',
replyTo: '<string>',
replyToName: '<string>',
ccEmails: ['<string>'],
bccEmails: ['<string>'],
attachments: [{}],
blocks: [{}],
html: '<string>',
delay: {
mode: '<string>',
days: 123,
hours: 123,
minutes: 123,
untilDateField: '<string>',
untilDateSource: '<string>',
untilOffsetDirection: '<string>',
untilMissingAction: '<string>',
untilPastAction: '<string>'
},
waitUntil: {
field: '<string>',
source: '<string>',
offset: {},
direction: '<string>',
missingAction: '<string>',
pastAction: '<string>'
},
waitUntilWeekday: {
day: '<string>',
days: [{}],
startTime: '<string>',
endTime: '<string>',
timezone: '<string>',
timezoneSource: '<string>',
minimumWait: {}
},
waitUntilKeyDate: {
key: '<string>',
days: 123,
hours: 123,
minutes: 123,
direction: '<string>',
pastAction: '<string>',
missingAction: '<string>'
},
delayMs: 123,
name: '<string>',
discount: {
label: '<string>',
provider: '<string>',
discountType: '<string>',
percentOff: 123,
amountOff: 123,
currency: '<string>',
duration: '<string>',
durationInMonths: 123,
appliesToAllPlans: true,
planIds: [{}],
codePrefix: '<string>',
maxRedemptions: 123,
lockToSubscriber: true,
expiresAt: '<string>',
expiresInHours: 123,
name: '<string>'
}
}
]
})
};
fetch('https://api.sequenzy.com/api/v1/sequences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/sequences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'labels' => [
'<string>'
],
'userCancellable' => true,
'activeSubscribersOnly' => true,
'bccEmails' => [
'<string>'
],
'trigger' => '<string>',
'fromEmail' => '<string>',
'fromName' => '<string>',
'senderProfileId' => '<string>',
'replyTo' => '<string>',
'replyToName' => '<string>',
'replyProfileId' => '<string>',
'listId' => '<string>',
'listIds' => [
'<string>'
],
'listScope' => '<string>',
'tagName' => '<string>',
'tagNames' => [
'<string>'
],
'segmentId' => '<string>',
'stopOnSegmentExit' => true,
'eventName' => '<string>',
'integrationSlug' => '<string>',
'integrationEventKey' => '<string>',
'customIntegration' => [
],
'propertyFilters' => [
[
'path' => '<string>',
'operator' => '<string>',
'value' => [
]
]
],
'inactiveDays' => 123,
'inactivityBaseline' => '<string>',
'minCount' => 123,
'timeWindowDays' => 123,
'enrollmentMode' => '<string>',
'enrollmentFieldPath' => '<string>',
'sendingWindow' => [
'enabled' => true,
'timezone' => '<string>',
'startTime' => '<string>',
'endTime' => '<string>',
'days' => [
[
]
]
],
'frequencyCapEnabled' => true,
'keyDates' => [
'timezone' => '<string>',
'dates' => [
[
]
]
],
'stopCondition' => [
],
'goal' => '<string>',
'emailCount' => 123,
'durationDays' => 123,
'emailStyle' => '<string>',
'steps' => [
[
'type' => '<string>',
'nodeType' => '<string>',
'config' => [
],
'subject' => '<string>',
'text' => '<string>',
'imageUrls' => [
[
]
],
'title' => '<string>',
'body' => '<string>',
'url' => [
],
'imageUrl' => [
],
'iconUrl' => [
],
'platforms' => [
'<string>'
],
'ineligibleAction' => '<string>',
'kind' => '<string>',
'format' => '<string>',
'position' => '<string>',
'eyebrow' => '<string>',
'imagePlacement' => '<string>',
'buttons' => [
[
]
],
'data' => [
],
'expiresAfterDays' => [
],
'pinned' => true,
'style' => [
],
'label' => '<string>',
'previewText' => '<string>',
'isTransactional' => true,
'senderProfileId' => '<string>',
'fromEmail' => '<string>',
'fromName' => '<string>',
'replyProfileId' => '<string>',
'replyTo' => '<string>',
'replyToName' => '<string>',
'ccEmails' => [
'<string>'
],
'bccEmails' => [
'<string>'
],
'attachments' => [
[
]
],
'blocks' => [
[
]
],
'html' => '<string>',
'delay' => [
'mode' => '<string>',
'days' => 123,
'hours' => 123,
'minutes' => 123,
'untilDateField' => '<string>',
'untilDateSource' => '<string>',
'untilOffsetDirection' => '<string>',
'untilMissingAction' => '<string>',
'untilPastAction' => '<string>'
],
'waitUntil' => [
'field' => '<string>',
'source' => '<string>',
'offset' => [
],
'direction' => '<string>',
'missingAction' => '<string>',
'pastAction' => '<string>'
],
'waitUntilWeekday' => [
'day' => '<string>',
'days' => [
[
]
],
'startTime' => '<string>',
'endTime' => '<string>',
'timezone' => '<string>',
'timezoneSource' => '<string>',
'minimumWait' => [
]
],
'waitUntilKeyDate' => [
'key' => '<string>',
'days' => 123,
'hours' => 123,
'minutes' => 123,
'direction' => '<string>',
'pastAction' => '<string>',
'missingAction' => '<string>'
],
'delayMs' => 123,
'name' => '<string>',
'discount' => [
'label' => '<string>',
'provider' => '<string>',
'discountType' => '<string>',
'percentOff' => 123,
'amountOff' => 123,
'currency' => '<string>',
'duration' => '<string>',
'durationInMonths' => 123,
'appliesToAllPlans' => true,
'planIds' => [
[
]
],
'codePrefix' => '<string>',
'maxRedemptions' => 123,
'lockToSubscriber' => true,
'expiresAt' => '<string>',
'expiresInHours' => 123,
'name' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/sequences"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"userCancellable\": true,\n \"activeSubscribersOnly\": true,\n \"bccEmails\": [\n \"<string>\"\n ],\n \"trigger\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"senderProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"listId\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"listScope\": \"<string>\",\n \"tagName\": \"<string>\",\n \"tagNames\": [\n \"<string>\"\n ],\n \"segmentId\": \"<string>\",\n \"stopOnSegmentExit\": true,\n \"eventName\": \"<string>\",\n \"integrationSlug\": \"<string>\",\n \"integrationEventKey\": \"<string>\",\n \"customIntegration\": {},\n \"propertyFilters\": [\n {\n \"path\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": {}\n }\n ],\n \"inactiveDays\": 123,\n \"inactivityBaseline\": \"<string>\",\n \"minCount\": 123,\n \"timeWindowDays\": 123,\n \"enrollmentMode\": \"<string>\",\n \"enrollmentFieldPath\": \"<string>\",\n \"sendingWindow\": {\n \"enabled\": true,\n \"timezone\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"days\": [\n {}\n ]\n },\n \"frequencyCapEnabled\": true,\n \"keyDates\": {\n \"timezone\": \"<string>\",\n \"dates\": [\n {}\n ]\n },\n \"stopCondition\": {},\n \"goal\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123,\n \"emailStyle\": \"<string>\",\n \"steps\": [\n {\n \"type\": \"<string>\",\n \"nodeType\": \"<string>\",\n \"config\": {},\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"imageUrls\": [\n {}\n ],\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": {},\n \"imageUrl\": {},\n \"iconUrl\": {},\n \"platforms\": [\n \"<string>\"\n ],\n \"ineligibleAction\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"position\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"imagePlacement\": \"<string>\",\n \"buttons\": [\n {}\n ],\n \"data\": {},\n \"expiresAfterDays\": {},\n \"pinned\": true,\n \"style\": {},\n \"label\": \"<string>\",\n \"previewText\": \"<string>\",\n \"isTransactional\": true,\n \"senderProfileId\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"ccEmails\": [\n \"<string>\"\n ],\n \"bccEmails\": [\n \"<string>\"\n ],\n \"attachments\": [\n {}\n ],\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"delay\": {\n \"mode\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"untilDateField\": \"<string>\",\n \"untilDateSource\": \"<string>\",\n \"untilOffsetDirection\": \"<string>\",\n \"untilMissingAction\": \"<string>\",\n \"untilPastAction\": \"<string>\"\n },\n \"waitUntil\": {\n \"field\": \"<string>\",\n \"source\": \"<string>\",\n \"offset\": {},\n \"direction\": \"<string>\",\n \"missingAction\": \"<string>\",\n \"pastAction\": \"<string>\"\n },\n \"waitUntilWeekday\": {\n \"day\": \"<string>\",\n \"days\": [\n {}\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"timezoneSource\": \"<string>\",\n \"minimumWait\": {}\n },\n \"waitUntilKeyDate\": {\n \"key\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"direction\": \"<string>\",\n \"pastAction\": \"<string>\",\n \"missingAction\": \"<string>\"\n },\n \"delayMs\": 123,\n \"name\": \"<string>\",\n \"discount\": {\n \"label\": \"<string>\",\n \"provider\": \"<string>\",\n \"discountType\": \"<string>\",\n \"percentOff\": 123,\n \"amountOff\": 123,\n \"currency\": \"<string>\",\n \"duration\": \"<string>\",\n \"durationInMonths\": 123,\n \"appliesToAllPlans\": true,\n \"planIds\": [\n {}\n ],\n \"codePrefix\": \"<string>\",\n \"maxRedemptions\": 123,\n \"lockToSubscriber\": true,\n \"expiresAt\": \"<string>\",\n \"expiresInHours\": 123,\n \"name\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/sequences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"userCancellable\": true,\n \"activeSubscribersOnly\": true,\n \"bccEmails\": [\n \"<string>\"\n ],\n \"trigger\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"senderProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"listId\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"listScope\": \"<string>\",\n \"tagName\": \"<string>\",\n \"tagNames\": [\n \"<string>\"\n ],\n \"segmentId\": \"<string>\",\n \"stopOnSegmentExit\": true,\n \"eventName\": \"<string>\",\n \"integrationSlug\": \"<string>\",\n \"integrationEventKey\": \"<string>\",\n \"customIntegration\": {},\n \"propertyFilters\": [\n {\n \"path\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": {}\n }\n ],\n \"inactiveDays\": 123,\n \"inactivityBaseline\": \"<string>\",\n \"minCount\": 123,\n \"timeWindowDays\": 123,\n \"enrollmentMode\": \"<string>\",\n \"enrollmentFieldPath\": \"<string>\",\n \"sendingWindow\": {\n \"enabled\": true,\n \"timezone\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"days\": [\n {}\n ]\n },\n \"frequencyCapEnabled\": true,\n \"keyDates\": {\n \"timezone\": \"<string>\",\n \"dates\": [\n {}\n ]\n },\n \"stopCondition\": {},\n \"goal\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123,\n \"emailStyle\": \"<string>\",\n \"steps\": [\n {\n \"type\": \"<string>\",\n \"nodeType\": \"<string>\",\n \"config\": {},\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"imageUrls\": [\n {}\n ],\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": {},\n \"imageUrl\": {},\n \"iconUrl\": {},\n \"platforms\": [\n \"<string>\"\n ],\n \"ineligibleAction\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"position\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"imagePlacement\": \"<string>\",\n \"buttons\": [\n {}\n ],\n \"data\": {},\n \"expiresAfterDays\": {},\n \"pinned\": true,\n \"style\": {},\n \"label\": \"<string>\",\n \"previewText\": \"<string>\",\n \"isTransactional\": true,\n \"senderProfileId\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"ccEmails\": [\n \"<string>\"\n ],\n \"bccEmails\": [\n \"<string>\"\n ],\n \"attachments\": [\n {}\n ],\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"delay\": {\n \"mode\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"untilDateField\": \"<string>\",\n \"untilDateSource\": \"<string>\",\n \"untilOffsetDirection\": \"<string>\",\n \"untilMissingAction\": \"<string>\",\n \"untilPastAction\": \"<string>\"\n },\n \"waitUntil\": {\n \"field\": \"<string>\",\n \"source\": \"<string>\",\n \"offset\": {},\n \"direction\": \"<string>\",\n \"missingAction\": \"<string>\",\n \"pastAction\": \"<string>\"\n },\n \"waitUntilWeekday\": {\n \"day\": \"<string>\",\n \"days\": [\n {}\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"timezoneSource\": \"<string>\",\n \"minimumWait\": {}\n },\n \"waitUntilKeyDate\": {\n \"key\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"direction\": \"<string>\",\n \"pastAction\": \"<string>\",\n \"missingAction\": \"<string>\"\n },\n \"delayMs\": 123,\n \"name\": \"<string>\",\n \"discount\": {\n \"label\": \"<string>\",\n \"provider\": \"<string>\",\n \"discountType\": \"<string>\",\n \"percentOff\": 123,\n \"amountOff\": 123,\n \"currency\": \"<string>\",\n \"duration\": \"<string>\",\n \"durationInMonths\": 123,\n \"appliesToAllPlans\": true,\n \"planIds\": [\n {}\n ],\n \"codePrefix\": \"<string>\",\n \"maxRedemptions\": 123,\n \"lockToSubscriber\": true,\n \"expiresAt\": \"<string>\",\n \"expiresInHours\": 123,\n \"name\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/sequences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"userCancellable\": true,\n \"activeSubscribersOnly\": true,\n \"bccEmails\": [\n \"<string>\"\n ],\n \"trigger\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"senderProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"listId\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"listScope\": \"<string>\",\n \"tagName\": \"<string>\",\n \"tagNames\": [\n \"<string>\"\n ],\n \"segmentId\": \"<string>\",\n \"stopOnSegmentExit\": true,\n \"eventName\": \"<string>\",\n \"integrationSlug\": \"<string>\",\n \"integrationEventKey\": \"<string>\",\n \"customIntegration\": {},\n \"propertyFilters\": [\n {\n \"path\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": {}\n }\n ],\n \"inactiveDays\": 123,\n \"inactivityBaseline\": \"<string>\",\n \"minCount\": 123,\n \"timeWindowDays\": 123,\n \"enrollmentMode\": \"<string>\",\n \"enrollmentFieldPath\": \"<string>\",\n \"sendingWindow\": {\n \"enabled\": true,\n \"timezone\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"days\": [\n {}\n ]\n },\n \"frequencyCapEnabled\": true,\n \"keyDates\": {\n \"timezone\": \"<string>\",\n \"dates\": [\n {}\n ]\n },\n \"stopCondition\": {},\n \"goal\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123,\n \"emailStyle\": \"<string>\",\n \"steps\": [\n {\n \"type\": \"<string>\",\n \"nodeType\": \"<string>\",\n \"config\": {},\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"imageUrls\": [\n {}\n ],\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": {},\n \"imageUrl\": {},\n \"iconUrl\": {},\n \"platforms\": [\n \"<string>\"\n ],\n \"ineligibleAction\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"position\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"imagePlacement\": \"<string>\",\n \"buttons\": [\n {}\n ],\n \"data\": {},\n \"expiresAfterDays\": {},\n \"pinned\": true,\n \"style\": {},\n \"label\": \"<string>\",\n \"previewText\": \"<string>\",\n \"isTransactional\": true,\n \"senderProfileId\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"ccEmails\": [\n \"<string>\"\n ],\n \"bccEmails\": [\n \"<string>\"\n ],\n \"attachments\": [\n {}\n ],\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"delay\": {\n \"mode\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"untilDateField\": \"<string>\",\n \"untilDateSource\": \"<string>\",\n \"untilOffsetDirection\": \"<string>\",\n \"untilMissingAction\": \"<string>\",\n \"untilPastAction\": \"<string>\"\n },\n \"waitUntil\": {\n \"field\": \"<string>\",\n \"source\": \"<string>\",\n \"offset\": {},\n \"direction\": \"<string>\",\n \"missingAction\": \"<string>\",\n \"pastAction\": \"<string>\"\n },\n \"waitUntilWeekday\": {\n \"day\": \"<string>\",\n \"days\": [\n {}\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"timezoneSource\": \"<string>\",\n \"minimumWait\": {}\n },\n \"waitUntilKeyDate\": {\n \"key\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"direction\": \"<string>\",\n \"pastAction\": \"<string>\",\n \"missingAction\": \"<string>\"\n },\n \"delayMs\": 123,\n \"name\": \"<string>\",\n \"discount\": {\n \"label\": \"<string>\",\n \"provider\": \"<string>\",\n \"discountType\": \"<string>\",\n \"percentOff\": 123,\n \"amountOff\": 123,\n \"currency\": \"<string>\",\n \"duration\": \"<string>\",\n \"durationInMonths\": 123,\n \"appliesToAllPlans\": true,\n \"planIds\": [\n {}\n ],\n \"codePrefix\": \"<string>\",\n \"maxRedemptions\": 123,\n \"lockToSubscriber\": true,\n \"expiresAt\": \"<string>\",\n \"expiresInHours\": 123,\n \"name\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Sequence created. AI is generating email content based on your brand. This typically takes 30-60 seconds.",
"sequence": {
"id": "seq_abc123",
"name": "Onboarding Sequence",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 5,
"sendingWindow": {
"enabled": true,
"timezone": "Europe/Kiev",
"startTime": "08:00",
"endTime": "20:00",
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
}
}
}
{
"success": true,
"message": "Sequence created with 2 emails and 1 discount action spanning 1 day. Use POST /api/v1/sequences/{id}/enable to activate.",
"sequence": {
"id": "seq_abc123",
"name": "Welcome Sequence",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 2,
"discountCount": 1,
"nodeCount": 6,
"sendingWindow": null
}
}
{
"success": true,
"message": "Sequence created with 1 email. Use POST /api/v1/sequences/{id}/enable to activate. Add the custom event feed using eventTrackingCode and eventTracking before enabling.",
"sequence": {
"id": "seq_abc123",
"name": "Trial Started",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 1,
"nodeCount": 3
},
"eventTrackingCode": "await fetch(\"https://api.sequenzy.com/api/v1/subscribers/events\", { ... properties: { trial_id: \"<trial_id>\" } ... });",
"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": {
"required": ["event", "properties"],
"identity": "Provide email or externalId. Email is required when the subscriber does not already exist.",
"event": "Must equal \"trial.started\".",
"requiredPropertyPaths": ["trial_id"]
},
"examplePayload": {
"email": "user@example.com",
"event": "trial.started",
"properties": { "trial_id": "<trial_id>" }
},
"examplePayloadMatchesFilters": true
},
"requiredEvents": ["trial.started"]
}
{
"success": true,
"message": "Sequence created with 6 emails. Use POST /api/v1/sequences/{id}/enable to activate.",
"sequence": {
"id": "seq_abc123",
"name": "Welcome series",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 6,
"sendingWindow": null
},
"warnings": [
"Ignored unknown field \"triggerConfig\". Send trigger settings as top-level fields such as \"trigger\", \"listId\", \"listIds\", \"tagName\", \"segmentId\" and \"eventName\".",
"Ignored \"steps[1].delay\": expected an object, so step 2 was saved without this delay. Use \"delay\": { \"days\": 2 } (days, hours, minutes) or \"delayMs\".",
"This contact_added sequence has no list and no \"listScope\", so once enabled it enrolls every contact added to this company. Send \"listId\" to limit it to one list, or \"listScope\": \"any_contact\" to keep this behavior."
]
}
{
"error": "Either 'goal' (for AI generation) or 'steps' (for explicit content) is required"
}
{
"error": "Step 1: either 'blocks' or 'html' is required"
}
{
"error": "Step 1: invalid block at 0.url: Invalid input: expected string, received undefined"
}
{
"error": "Step 1: expiresAt must be in the future"
}
{
"error": "Invalid trigger type 'invalid'. Valid types: contact_added, tag_added, segment_entered, segment_exited, event_received, inbound_webhook, inactivity, frequency, manual"
}
{
"error": "propertyFilters is only supported for the event_received trigger"
}
{
"error": "propertyFilters[0].value is required for the 'equals' operator"
}
{
"error": "emailCount must be no more than 10"
}
{
"error": "Invalid API key"
}
{
"error": "No companies found. Create a company first using the create_company tool."
}
{
"type": "validation",
"on": "body",
"property": "/enrollmentMode",
"message": "Expected union value",
"summary": "Property 'enrollmentMode' must be one of: unlimited, one_time, matching_field",
"found": { "name": "Welcome series", "enrollmentMode": "once" },
"errors": [
{
"path": "/enrollmentMode",
"message": "Expected union value",
"summary": "Property 'enrollmentMode' must be one of: unlimited, one_time, matching_field",
"allowedValues": ["unlimited", "one_time", "matching_field"]
}
]
}
If you use an account key as a marketer, choose an existing sender and
Reply-To profile. A request that needs a new profile returns
400 before
creating profiles, labels, or campaign/sequence changes. This also applies to
email steps and inserted sequence branches. An owner or admin can add the
identity first; a step-level display-name override can still use an existing
profile.- Provide a
goalto have AI generate the email content - Provide
stepswith explicit email content and actions such as discount creation or Update Subscriber - Omit both
goalandstepsto create the same blank trigger-to-completion draft the dashboard starts with
"effectiveStatus": "draft" and nobody is enrolled until you call
Enable Sequence. See
List Sequences for the full run-state mapping.
Request
string
required
Name for the sequence
string
Dashboard description for the sequence. For a seasonal sale sequence (for
example a Black Friday countdown) it doubles as the offer: generated emails
quote its offer sentences (discount, code, scope) verbatim, so keep internal
notes out of it.
string[]
Dashboard label names. Missing labels are created automatically.
boolean
Whether recipients can cancel this sequence from email preferences.
boolean
default:"false"
Only enroll contacts whose status is
active. When false, unsubscribed and
bounced contacts still enter on tag, event, list and contact triggers, so
non-marketing steps such as tags, webhooks and transactional emails run for
them, and their marketing emails are skipped at send time. Set true to keep
them out of the sequence entirely. Contacts waiting to confirm double opt-in
still wait at the trigger and continue once they confirm.string[]
Up to 10 addresses blind-copied on every sequence email.
string
Trigger type:
contact_added, tag_added, segment_entered,
segment_exited, event_received, inbound_webhook, inactivity,
frequency, or manual. segment_exited enrolls active contacts who stop
matching the segment; unsubscribing or bouncing does not count as leaving.
Defaults to contact_added when omitted. manual never enrolls anyone
automatically: pair it with keyDates and waitUntilKeyDate steps for a
one-time countdown, then enroll the
audience after enabling the
sequence.string
From address for every email in this sequence. Its domain must be configured
and verified. Mutually exclusive with
senderProfileId.string
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 you send
senderProfileId, which already carries its own display name.string
Existing sender profile ID. It already supplies both the From address and the
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.string
Reply-To address for every email in this sequence. Mutually exclusive with
replyProfileId.string
Display name for the Reply-To address. Requires
replyTo; omit it when you
send replyProfileId, which already carries its own display name. An address
carries one Reply-To name company-wide: if replyTo already has a saved
profile under a different name, that saved name is kept and the response
warnings array says so.string
Existing reply profile ID. It already supplies both the Reply-To address and
the display name, so send it on its own and omit
replyTo and replyToName.string
List ID (for
contact_added trigger). Omit it to use listScope instead. Use
listIds to trigger on several lists.string[]
Several list IDs (for
contact_added trigger). A contact joining any of
them enters the sequence. Takes precedence over listId when you send both.
Cannot be combined with listScope. Up to 25 lists.string
default:"any_contact"
For
contact_added triggers with no list at all. any_contact enrolls every
contact that is added, including contacts that join no list - which is what an
integration creates when its list targeting is empty. any_list waits until
the contact joins a list. Cannot be combined with listId or listIds.string
Tag name (for
tag_added trigger). Use tagNames to trigger on several tags.string[]
Several tag names (for
tag_added trigger). Receiving any of them enters
the contact into the sequence. Takes precedence over tagName when you send
both. Up to 25 tags.string
Segment ID (for
segment_entered and segment_exited triggers)boolean
For
segment_entered, cancel an enrollment when the subscriber leaves the
segment.string
Event name (for
event_received, inactivity, frequency triggers)string
Integration slug for an
inbound_webhook trigger.string
Integration event key for an
inbound_webhook trigger.object
Custom integration metadata for an
inbound_webhook trigger.array
Event property filters (for
event_received and inbound_webhook triggers,
maximum 10).
The sequence only starts when the triggering event’s properties match ALL
filters. Use a dot-path into the event properties; use [] to match items
inside arrays, for example lineItems[].providerProductId.Show Filter properties
Show Filter properties
string
required
Dot-path into the event properties, such as
plan,
lineItems[].providerProductId, or productIds.string
required
One of
exists, not_exists, equals, not_equals, one_of,
contains, greater_than, or less_than. one_of matches when the
property equals any entry of the value array - for example, scope a
trigger to several products with
{"path": "lineItems[].providerProductId", "operator": "one_of", "value": ["prod_1", "prod_2"]}.string | number | boolean | array
Value to compare against. Required for every operator except
exists
and not_exists. For one_of, pass a non-empty array of strings or
numbers with at most 50 values; all other operators take a single
value.number
Days of inactivity (for
inactivity trigger)string
For
inactivity triggers, when to start counting for subscribers who have
never performed the event: sequence_created_at or subscriber_created_at.
Defaults to sequence_created_at.number
Minimum event count (for
frequency trigger)number
Time window in days (for
frequency trigger)string
Re-entry mode:
unlimited, one_time, or matching_field. Defaults to
matching_field for Shopify replenishment and back-in-stock events, otherwise
unlimited. matching_field is only valid for event_received and
inbound_webhook sequence triggers.string
Scalar dot-path event property used by
matching_field, such as order.id or
product.providerVariantId. Array traversal with [] is not supported; use
propertyFilters when the trigger must match values inside an array. Leave
empty for the built-in Shopify product/variant default.object
Optional local-time sending window for every email step in the sequence. Email
steps that become due outside the window wait until the next allowed local
time.
Show Sending window properties
Show Sending window properties
boolean
Set to
false to disable the window. Omit sendingWindow when you do not
want a sending restriction.string
required
IANA timezone for the window, such as
Europe/Kiev or
America/New_York.string
required
Earliest local send time in
HH:mm format, for example 08:00.string
required
Latest local send cutoff in
HH:mm format, for example 20:00. Must be
later than startTime.array
Allowed local days. Use full day names such as
monday; omit to allow
every day.boolean
default:"false"
Whether the sequence respects the company 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 moves on to the next step.
Transactional steps are never skipped and transactional emails never count.
Has no effect until a cap is set. Non-boolean values return 422.object | null
Named absolute moments the sequence counts down to, such as “Black Friday
starts”. Delay steps with
waitUntilKeyDate wait relative to one of them, so
the whole countdown is re-timed by editing these dates. Set to null to
clear.Show Key dates properties
Show Key dates properties
string
required
IANA timezone the dates are shown and edited in, such as
America/New_York.object[]
required
Up to 20 entries of
{ key?, label, at }. at is an ISO 8601
date-time; a value without a zone designator such as
2026-11-27T00:00 is read as wall-clock time in timezone, and every
value is returned normalized to UTC. key (lowercase letters, digits,
underscores) defaults to a slug of the label, so “Black Friday starts”
becomes black_friday_starts. Keys must be unique.object
Optional auto-stop condition, re-evaluated before every step including the
first one. Use
has_tag to end the sequence when a subscriber gets a tag,
event_received when an event is tracked, added_to_list when a subscriber
joins a list, entered_segment when a subscriber enters a segment,
field_changed when a subscriber attribute changes, or none to clear
auto-stop behavior. 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. event_received only counts events
received after enrollment; the enrolling event and earlier history do not
satisfy the stop. Use matchConfig.mode: "event_property_filter" with
propertyFilters to require every literal-value filter to match a later stop
event, or matchConfig.mode: "event_property" with field mapping rules to
compare the stop event with the enrolling event. field_changed can include
matchConfig.mode: "field_value" with an operator and comparison value. Tag
and list defaults are returned with value: null and matchConfig.mode: "entry_audience"; sending that shape back preserves the per-enrollment tag or
list guard.Option A: AI Generation
string
Description of what the sequence should accomplish. AI will generate email
content based on this.
number
Number of emails to generate (default:
5, maximum: 10)number
Total duration in days used to space AI-generated emails. Omit this to use the
default sequence delay schedule.
string
Style for the AI-generated emails:
visual (designed, with heroes, imagery,
and rich sections) or plain (personal, text-first notes with a single
button). Defaults to the company’s saved preference when omitted.Option B: Explicit Content
array
Array of explicit steps. Email steps must have either
blocks or html; SMS steps use type: "sms" with text; push steps use type: "push" with title and/or body; in-app steps use type: "in_app" with title and/or body; discount steps use type: "create_discount"; Update Subscriber steps use type: "update_subscriber", nodeType: "action_update_attributes", and config.Show Step properties
Show Step properties
string
Step type. Omit or use
email for email content. Use sms for a native SMS step, push for a push notification, in_app for an in-app message or content card, create_discount for a dynamic discount, or update_subscriber to copy event data onto the subscriber.string
Use
action_update_attributes for Update Subscriber steps.object
Update Subscriber step config.
firstName, lastName, and
customAttributeUpdates[].value can use standalone merge tags such as
{{event.plan}}, {{event.amount}}, and {{event.active}}. Set
valueType to text, number, or boolean; number and boolean values
are coerced after resolution.string
required
Email subject line. Required for email steps.
string
SMS steps only: plain-text message body. Merge tags like
{{FIRST_NAME}} work. Do not include opt-out text or a brand prefix - Sequenzy adds both automatically at send time. Generate drafts with the Generate SMS endpoint.array
SMS steps only: up to 2 publicly reachable image URLs sent as MMS media.
string
Push steps: notification title, up to 120 characters. In-app steps: title, up to 200 characters. Merge tags work.
string
Push steps: notification message, up to 500 characters. In-app steps: message text, up to 2000 characters. Merge tags work.
string | null
Push steps only: link opened on tap, an https URL or an app deep link.
string | null
Push and in-app steps: optional https image.
string | null
Push steps only: optional https web push icon.
string[]
Push steps only: limit delivery to
web, ios, and/or android. Omit for every platform.string
SMS and push steps:
skip (default) continues the sequence when the contact can’t receive the message (SMS: no phone, not opted in, unsupported country; push: no active device); exit removes them from the sequence.string
default:"message"
In-app steps only:
message (modal, banner or full screen; shown once) or card (stays in the app’s card feed until dismissed).string
default:"modal"
In-app messages only:
modal, banner or fullscreen.string
default:"bottom"
In-app banners:
top or bottom. In-app modals: bottom (a sheet that rises from the bottom edge) or center.string
In-app steps only: a short line above the title, up to 40 characters, for example
3 days left. Merge tags work.string
default:"top"
In-app modals and full screens with an image:
top draws the image above the text; background fills the message with the image and puts the text on a dark gradient over it.object[]
In-app steps only: up to 2 buttons, each
{ "label", "action", "url" }. action is open_url (default; needs url, an https link or app deep link) or dismiss.object
In-app steps only: up to 20 string key/values passed to your app with the item. Merge tags work in values.
number | null
In-app steps only: days until the item leaves the feed, 1 to 365. Messages default to 30; cards never expire unless set.
boolean
In-app cards only: sort before other cards.
object | null
In-app steps only: how the item looks.
preset is brand (default), soft, bold or dark, built from your brand color and button style. Optional overrides: backgroundColor, textColor, buttonColor, buttonTextColor (hex like #1a73e8), cornerRadius (0 to 32) and buttonRadius (0 to 40). Each item in the feed carries the resolved values in style.string
SMS, push and in-app steps: display label for the step in the builder.
string
Email preview text
boolean
Use transactional chrome for this sequence email.
string
Existing sender profile override for this email step. It may be combined
with
fromName, which changes only the visible display name for this
step. Mutually exclusive with fromEmail.string
From address for this email step. Its domain must be configured and
verified. Mutually exclusive with
senderProfileId.string
Display name override for this email step. Alone or with
senderProfileId, it changes only the visible name; with fromEmail, it
also names a newly created sender profile.string
Existing Reply-To profile override for this email step. Mutually
exclusive with
replyTo.string
Reply-To address for this email step. Mutually exclusive with
replyProfileId.string
Display name for this step’s Reply-To address. Requires
replyTo; omit
it when using replyProfileId, which already carries its own display
name.string[]
Per-step visible copy recipients.
string[]
Per-step blind-copy recipients.
array
URL-backed file attachments for this email step, as
{ filename, path }
objects. path can be a public HTTPS URL or, for an event-triggered
sequence, an event value such as {{event.file_url}}. filename can
also contain event merge tags, for example
file-{{event.order_id}}.pdf. Values are resolved from the event that
enrolled the subscriber, then the final URL is validated and fetched at
send time (max 10 attachments, 15MB total per email). Base64 content is
not supported here.array
Email content blocks in Sequenzy format.
Provide
blocks OR html, not both. Put block styling under styles;
top-level style keys like backgroundColor, backgroundOpacity,
textColor, textAlign, borderColor, borderWidth, and
borderRadius are normalized into styles.Blocks are validated against the block schema. A block that is structurally
invalid is rejected with 400 naming the step, the block index, and the
field, rather than stored - a stored block the renderer cannot render fails
every enrollment at that step permanently. Fields that parse but will not
render as their name suggests come back in an advisory warnings array on
the 200.string
Raw HTML content (plain HTML, React Email output, MJML output, etc.).
Stored as one raw HTML block; Sequenzy does not convert it to native
blocks.
Provide
html OR blocks, not both.object
Fixed delay before this email. To wait until a date from the trigger
event or a contact attribute, set
mode to until_date and provide
untilDateField, or use the waitUntil shorthand.Show Delay properties
Show Delay properties
string
duration for fixed waits or until_date for dynamic date-field
waits. Defaults to duration.number
Days to wait
number
Hours to wait
number
Minutes to wait
string
Date field path to wait until when
mode is until_date, for
example renews_at.string
event (default) reads untilDateField from the trigger event;
attribute reads it from the contact’s custom attributes.string
before or after. Defaults to after.string
continue or exit when the date field is missing or invalid.
Defaults to continue.string
continue, skip, or exit when the date already passed. Same
behavior as waitUntil.pastAction. Defaults to continue for
until_date.object
Shorthand for a dynamic delay that waits until a date from the trigger
event or a contact attribute. The value must be an ISO 8601 date, such
as
2027-02-15, or a Unix timestamp. For a per-contact timeline that
contacts can join at any point, such as emails before and after a due
date, read the date from an attribute and set pastAction to skip.Show Wait-until properties
Show Wait-until properties
string
required
Date field path, for example
renews_at, subscription.renews_at,
or dueDate.string
Where
field is read from. event (default) reads the trigger
event’s properties and needs an event trigger. attribute reads the
contact’s custom attributes when the step is reached, so it works
with any trigger. A contact already waiting here is held longer if
the date moves later. Moving it earlier does not release them sooner,
and a date removed while they wait follows missingAction.object
Optional offset object with
days, hours, and minutes.string
before or after. Defaults to after.string
continue or exit when the date field is missing or invalid.
Defaults to continue.string
What a contact does when they reach this step after the date (with
its offset) already passed:
continue (default) moves on
immediately, skip skips the following email and action steps until
the next wait, condition or branch so late joiners only receive what
is still ahead, exit ends the
enrollment. Use continue on a final wait that every contact should
reach, for example a last email after the date.object
Hold this step until the next occurrence of a weekday inside a
local-time window, for example next Sunday between 09:00 and 12:00 in
America/Los_Angeles. Contacts reaching the step inside the window
continue immediately; everyone else waits for the next occurrence. Place
it immediately before the email when the send day matters: it controls
when the flow resumes, so any step between it and the email shifts the
send off the window. A sequence-level sendingWindow holds emails at
send time but does not reschedule the graph.Show Wait-until-weekday properties
Show Wait-until-weekday properties
string
Single weekday, for example
sunday or sun. Shorthand for days.array
Weekday names the wait may release on. The nearest upcoming day wins.
string
required
Window start in 24-hour
HH:mm local time, for example 09:00.string
Window end in 24-hour
HH:mm local time. Defaults to the end-of-day
boundary 24:00. A
wake-up missed past endTime (rare operational failure) rolls to the
next configured day instead of releasing late.string
required
IANA timezone the window is evaluated in, for example
America/Los_Angeles. When timezoneSource is subscriber, this is
the fallback for contacts without a valid timezone.string
default:"fixed"
fixed evaluates the window in timezone for every contact.
subscriber evaluates it in each contact’s own timezone field, so
09:00 means 9am local for every contact, and falls back to
timezone. The contact’s timezone is read each time the step is
evaluated, so a timezone set while a contact waits applies when they
resume. Sequence reads return waitUntilWeekday.timezoneSource.object
Wait at least this long before looking for the window, with
days,
hours, and minutes, for example { "days": 6 }. When it ends,
the contact continues right away if that moment is inside the
window, otherwise at the next window opening. This replaces a fixed
delay step followed by a separate weekday wait. Omit it for no
minimum. Sequence reads return waitUntilWeekday.minimumWait, with
zeros when the step has none.object
Wait relative to one of the sequence’s
keyDates before this step, for
example 7 days before black_friday_starts or 1 hour before
black_friday_ends. Provide only one of waitUntil, waitUntilWeekday,
or waitUntilKeyDate.Show Wait-until-key-date properties
Show Wait-until-key-date properties
string
required
Key date identifier from
keyDates.number
Offset days.
number
Offset hours.
number
Offset minutes.
string
before or after the key date. Defaults to before. Leave the
offset at zero to fire exactly at the key date.string
What a contact does when they reach this step after the moment
already passed:
skip (default) skips the following steps until the
next wait so late enrollees only receive what is still ahead,
continue sends immediately, exit ends the enrollment.string
exit (default) or continue when the key date no longer exists.number
Delay before this step in milliseconds. Prefer
delay for hand-written
requests; use delayMs when importing provider waits.string
Optional name for the email template.
object
Discount configuration for
create_discount steps. For new integrations, put discount options here; legacy top-level discount fields are still accepted.Show Discount properties
Show Discount properties
string
Builder label for discount steps.
string
Discount provider. Use
stripe to dynamically create a Stripe coupon plus promotion code, or shopify to dynamically create a Shopify Admin discount code.string
Discount type:
percent or amount.number
Percent discount from
1 to 100. Required when discountType is percent.number
Fixed discount in the smallest currency unit, for example
500 for $5. Required when discountType is amount.string
Currency for fixed-amount discounts. Defaults to
usd.string
Coupon duration:
once, forever, or repeating. Defaults to once.number
Required for
repeating discounts.boolean
Whether the discount applies to all plans. Defaults to
true.array
Provider product IDs when
appliesToAllPlans is false. Stripe uses IDs like prod_abc123; Shopify accepts numeric product IDs or gid://shopify/Product/... IDs.string
Optional prefix for generated dynamic codes. The final code also includes a subscriber/token suffix.
number
Maximum redemptions for each generated code. Use
1 for subscriber-specific codes.boolean
Stripe-only. When
true, each generated promotion code is restricted to the matched subscriber’s Stripe customer.string
Optional future expiration date or ISO timestamp. Mutually exclusive with
expiresInHours.number
Optional relative expiration in hours, resolved to an absolute timestamp when each subscriber’s code is created. Use this for flows like “valid for 48 hours” that should restart per enrollment. Takes precedence over
expiresAt when both are provided.string
Optional display name for each dynamically generated provider discount.
Option C: Blank Draft
Send onlyname (and optionally metadata or a trigger). The API creates a
disabled draft containing the trigger and completion nodes, ready for later
insertSteps, branch insertion, or graph edits.
Request Shape and Warnings
Every trigger setting is a top-level field. Acontact_added sequence for one
list uses "trigger": "contact_added" and "listId", not a nested
triggerConfig object. Step delays are objects such as "delay": { "days": 2 },
or delayMs.
This minimal request creates a six-email draft for one list, sending the first
email right away and each later email two days after the previous one:
{
"name": "Welcome series",
"trigger": "contact_added",
"listId": "list_abc123",
"enrollmentMode": "one_time",
"steps": [
{ "subject": "Welcome", "html": "<p>Welcome</p>" },
{ "subject": "Email 2", "html": "<p>Email 2</p>", "delay": { "days": 2 } },
{ "subject": "Email 3", "html": "<p>Email 3</p>", "delay": { "days": 2 } },
{ "subject": "Email 4", "html": "<p>Email 4</p>", "delay": { "days": 2 } },
{ "subject": "Email 5", "html": "<p>Email 5</p>", "delay": { "days": 2 } },
{ "subject": "Email 6", "html": "<p>Email 6</p>", "delay": { "days": 2 } }
]
}
stopCondition to keep the default list guard, which stops a run when the
contact leaves the list. Send { "type": "none" } to turn it off.
For compatibility, some requests that do not match this shape still create the
draft. The response then includes a warnings array that names each problem:
| Sent | Result |
|---|---|
triggerConfig, triggerType or another unknown field | Ignored. Send trigger settings as top-level fields. |
delay: 2, delay: "2d", delayDays or delayHours | Ignored, so the step has no wait. Use delay: { "days": 2 } or delayMs. |
A contact_added list ID not found in your company | Saved, but enabling is rejected until the trigger uses an existing list. |
A body companyId that differs from the selected company | Ignored. Select the company with the X-Company-Id header. |
contact_added with no listId, listIds or listScope | Enrolls every contact added to the company once enabled. Enable repeats this warning. |
"listScope": "any_contact" when you do want every new contact. Enable
Sequence still notes that audience in its warnings, so you can confirm it
before contacts start entering.
A field with the wrong type or an unsupported value, such as
"enrollmentMode": "once" or a stopCondition sent as a string, returns 422.
The response names the field in property and explains it in summary, with
allowedValues for fields that accept a fixed set of values.
Discount Merge Tags
When acreate_discount step runs, Sequenzy creates a fresh provider discount/code for that subscriber’s automation run. Later emails in the same sequence can use discount merge tags from the most recent created discount:
{{discount.code}}{{discount.percentOff}}{{discount.amountOff}}{{discount.currency}}{{discount.expiresAt}}
Enrollment Modes
Usematching_field for event-triggered sequences where each run belongs to a specific object in the event payload. It lets a subscriber have separate active runs for different products, variants, orders, subscriptions, or other event-scoped objects, while blocking duplicate active runs for the same resolved field. Set enrollmentFieldPath for custom events, or send sequenceEnrollmentKey, enrollmentKey, or common product/variant fields in the event properties.
{
"trigger": "event_received",
"eventName": "ecommerce.order_placed",
"enrollmentMode": "matching_field",
"enrollmentFieldPath": "order.id"
}
Sending Windows
UsesendingWindow when a triggered sequence should start immediately but emails
should only go out during allowed local hours. The window is checked before every
email action, including later steps after delays or branches.
{
"sendingWindow": {
"enabled": true,
"timezone": "Europe/Kiev",
"startTime": "08:00",
"endTime": "20:00",
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
}
}
Event-Personalized Sequence Emails
If you create a sequence withtrigger: "event_received", the event payload that enrolls the subscriber is available inside sequence emails through event. merge tags.
For example, if your app sends:
{
"email": "user@example.com",
"event": "weather.wind_alert",
"properties": {
"city": "Tel Aviv",
"alert": {
"maxSpeed": 75
},
"duration": {
"hours": 6
}
}
}
{{event.city}}{{event.alert.maxSpeed}}{{event.duration.hours|a few}}
Examples
AI-Generated Content
curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Onboarding Sequence",
"trigger": "contact_added",
"stopCondition": {
"type": "has_tag",
"value": "customer"
},
"sendingWindow": {
"enabled": true,
"timezone": "Europe/Kiev",
"startTime": "08:00",
"endTime": "20:00",
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
},
"goal": "Welcome new users and help them get started with our product",
"emailCount": 5,
"durationDays": 14
}'
Explicit Content with Blocks
curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome Sequence",
"trigger": "contact_added",
"steps": [
{
"subject": "Welcome to our product!",
"blocks": [
{
"id": "heading-1",
"type": "heading",
"content": "Welcome!",
"level": 1
},
{
"id": "text-1",
"type": "text",
"content": "<p>Thanks for signing up. We are excited to have you.</p>",
"variant": "paragraph"
}
]
},
{
"subject": "Getting started guide",
"delay": { "days": 1 },
"blocks": [
{
"id": "heading-2",
"type": "heading",
"content": "Getting Started",
"level": 1
},
{
"id": "text-2",
"type": "text",
"content": "<p>Here is everything you need to get started...</p>",
"variant": "paragraph"
}
]
}
]
}'
Explicit Content with HTML (Auto-converted)
Use this when migrating from other platforms or when you have existing HTML templates (React Email, MJML, etc.).curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Migrated Sequence",
"trigger": "contact_added",
"steps": [
{
"subject": "Welcome!",
"html": "<h1>Welcome to our platform!</h1><p>We are thrilled to have you on board.</p><a href=\"https://example.com/start\">Get Started</a>"
},
{
"subject": "Quick tips to get started",
"delay": { "days": 2 },
"html": "<h2>Getting Started Guide</h2><p>Here are some tips:</p><ul><li>Complete your profile</li><li>Explore the dashboard</li><li>Connect your integrations</li></ul>"
}
]
}'
Explicit Discount Action
Use this when you want Sequenzy to generate a dynamic provider discount code before sending a follow-up email. Connect the selected provider in Settings before enabling the sequence.curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Win-back Discount",
"trigger": "tag_added",
"tagName": "cancelled",
"steps": [
{
"type": "create_discount",
"discount": {
"label": "Create win-back discount",
"provider": "stripe",
"discountType": "percent",
"percentOff": 20,
"duration": "once",
"appliesToAllPlans": true,
"maxRedemptions": 1,
"lockToSubscriber": true,
"codePrefix": "WINBACK"
}
},
{
"subject": "Come back with {{discount.code}}",
"delay": { "days": 1 },
"html": "<p>Use {{discount.code}} for {{discount.percentOff}}% off your next subscription.</p>"
}
]
}'
Inactivity Sequence
curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Login Win-back",
"trigger": "inactivity",
"eventName": "app.login",
"inactiveDays": 14,
"inactivityBaseline": "sequence_created_at",
"goal": "Bring inactive users back into the app"
}'
Product-Scoped Purchase Sequence (Property Filters)
UsepropertyFilters to start a purchase sequence only for one specific product, for example to deliver a digital product file. Use lineItems[].providerProductId for ecommerce.order_placed events, or productIds for Stripe saas.purchase events.
curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Ebook Delivery",
"trigger": "event_received",
"eventName": "saas.purchase",
"propertyFilters": [
{
"path": "productIds",
"operator": "equals",
"value": "prod_ABC123"
}
],
"steps": [
{
"subject": "Your download is ready",
"html": "<p><a href=\"{{event.download.url}}\">Download {{event.download.name}}</a></p>"
}
]
}'
Event-Triggered Sequence With {{event.*}}
curl -X POST "https://api.sequenzy.com/api/v1/sequences" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Wind Alert Follow-up",
"trigger": "event_received",
"eventName": "weather.wind_alert",
"steps": [
{
"subject": "Wind alert for {{event.city}}",
"html": "<p>Winds may reach {{event.alert.maxSpeed}} km/h for {{event.duration.hours|a few}} hours.</p>"
},
{
"subject": "Stay safe in {{event.city}}",
"delay": { "hours": 12 },
"html": "<p>The original alert is still active for {{event.city}}. Check local guidance if conditions change.</p>"
}
]
}'
Responses
{
"success": true,
"message": "Sequence created. AI is generating email content based on your brand. This typically takes 30-60 seconds.",
"sequence": {
"id": "seq_abc123",
"name": "Onboarding Sequence",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 5,
"sendingWindow": {
"enabled": true,
"timezone": "Europe/Kiev",
"startTime": "08:00",
"endTime": "20:00",
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
}
}
}
{
"success": true,
"message": "Sequence created with 2 emails and 1 discount action spanning 1 day. Use POST /api/v1/sequences/{id}/enable to activate.",
"sequence": {
"id": "seq_abc123",
"name": "Welcome Sequence",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 2,
"discountCount": 1,
"nodeCount": 6,
"sendingWindow": null
}
}
{
"success": true,
"message": "Sequence created with 1 email. Use POST /api/v1/sequences/{id}/enable to activate. Add the custom event feed using eventTrackingCode and eventTracking before enabling.",
"sequence": {
"id": "seq_abc123",
"name": "Trial Started",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 1,
"nodeCount": 3
},
"eventTrackingCode": "await fetch(\"https://api.sequenzy.com/api/v1/subscribers/events\", { ... properties: { trial_id: \"<trial_id>\" } ... });",
"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": {
"required": ["event", "properties"],
"identity": "Provide email or externalId. Email is required when the subscriber does not already exist.",
"event": "Must equal \"trial.started\".",
"requiredPropertyPaths": ["trial_id"]
},
"examplePayload": {
"email": "user@example.com",
"event": "trial.started",
"properties": { "trial_id": "<trial_id>" }
},
"examplePayloadMatchesFilters": true
},
"requiredEvents": ["trial.started"]
}
{
"success": true,
"message": "Sequence created with 6 emails. Use POST /api/v1/sequences/{id}/enable to activate.",
"sequence": {
"id": "seq_abc123",
"name": "Welcome series",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 6,
"sendingWindow": null
},
"warnings": [
"Ignored unknown field \"triggerConfig\". Send trigger settings as top-level fields such as \"trigger\", \"listId\", \"listIds\", \"tagName\", \"segmentId\" and \"eventName\".",
"Ignored \"steps[1].delay\": expected an object, so step 2 was saved without this delay. Use \"delay\": { \"days\": 2 } (days, hours, minutes) or \"delayMs\".",
"This contact_added sequence has no list and no \"listScope\", so once enabled it enrolls every contact added to this company. Send \"listId\" to limit it to one list, or \"listScope\": \"any_contact\" to keep this behavior."
]
}
{
"error": "Either 'goal' (for AI generation) or 'steps' (for explicit content) is required"
}
{
"error": "Step 1: either 'blocks' or 'html' is required"
}
{
"error": "Step 1: invalid block at 0.url: Invalid input: expected string, received undefined"
}
{
"error": "Step 1: expiresAt must be in the future"
}
{
"error": "Invalid trigger type 'invalid'. Valid types: contact_added, tag_added, segment_entered, segment_exited, event_received, inbound_webhook, inactivity, frequency, manual"
}
{
"error": "propertyFilters is only supported for the event_received trigger"
}
{
"error": "propertyFilters[0].value is required for the 'equals' operator"
}
{
"error": "emailCount must be no more than 10"
}
{
"error": "Invalid API key"
}
{
"error": "No companies found. Create a company first using the create_company tool."
}
{
"type": "validation",
"on": "body",
"property": "/enrollmentMode",
"message": "Expected union value",
"summary": "Property 'enrollmentMode' must be one of: unlimited, one_time, matching_field",
"found": { "name": "Welcome series", "enrollmentMode": "once" },
"errors": [
{
"path": "/enrollmentMode",
"message": "Expected union value",
"summary": "Property 'enrollmentMode' must be one of: unlimited, one_time, matching_field",
"allowedValues": ["unlimited", "one_time", "matching_field"]
}
]
}
Notes
- The sequence is created in
draftstatus. UsePOST /api/v1/sequences/{id}/enableto activate it. - For backwards compatibility,
POST /v1/sequencesis still accepted as an alias. - When using email
steps, each email step creates an email template in your account that can be edited later. - Sequences with
create_discountsteps require a connected integration for the selected provider before activation. - SMS steps require the SMS add-on (paid plans). Check Get SMS Settings first; steps added while SMS is not ready are stored but skip at runtime.
- Push steps send only once web push, APNs or Firebase is set up. Check Get Push Settings first; see Push notifications.
- In-app steps store each item in the contact’s in-app feed; your app must fetch and render it. See In-app messages.
- When using
goal, AI generates content asynchronously. PollGET /api/v1/sequences/{id}to check enrichment status. - The first step typically has no delay (sends immediately after trigger).
- If
sendingWindowis set, each email step sends only during the allowed local hours and waits until the next allowed time otherwise. - For
event_receivedsequences, properties sent toPOST /api/v1/subscribers/eventsare available as{{event.*}}merge tags in sequence emails. - For custom event triggers, use the returned
eventTrackingCodeandeventTrackingcontract to implement the application-owned event feed. The contract includes normalizedpropertyFiltersand reports whether its generated example already satisfies them throughexamplePayloadMatchesFilters. If that value isfalse, adapt the example usingpayloadContractandexamplePayloadNotebefore sending it. Withmatching_fieldenrollment, every required property path must be present inpropertiesor the sequence cannot identify the matching run. - When using
htmlin steps, the content is preserved as one raw HTML block. Useblockswhen you want native Sequenzy block editing.
⌘I
Create Sequence
curl --request POST \
--url https://api.sequenzy.com/api/v1/sequences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"labels": [
"<string>"
],
"userCancellable": true,
"activeSubscribersOnly": true,
"bccEmails": [
"<string>"
],
"trigger": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"senderProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"replyProfileId": "<string>",
"listId": "<string>",
"listIds": [
"<string>"
],
"listScope": "<string>",
"tagName": "<string>",
"tagNames": [
"<string>"
],
"segmentId": "<string>",
"stopOnSegmentExit": true,
"eventName": "<string>",
"integrationSlug": "<string>",
"integrationEventKey": "<string>",
"customIntegration": {},
"propertyFilters": [
{
"path": "<string>",
"operator": "<string>",
"value": {}
}
],
"inactiveDays": 123,
"inactivityBaseline": "<string>",
"minCount": 123,
"timeWindowDays": 123,
"enrollmentMode": "<string>",
"enrollmentFieldPath": "<string>",
"sendingWindow": {
"enabled": true,
"timezone": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"days": [
{}
]
},
"frequencyCapEnabled": true,
"keyDates": {
"timezone": "<string>",
"dates": [
{}
]
},
"stopCondition": {},
"goal": "<string>",
"emailCount": 123,
"durationDays": 123,
"emailStyle": "<string>",
"steps": [
{
"type": "<string>",
"nodeType": "<string>",
"config": {},
"subject": "<string>",
"text": "<string>",
"imageUrls": [
{}
],
"title": "<string>",
"body": "<string>",
"url": {},
"imageUrl": {},
"iconUrl": {},
"platforms": [
"<string>"
],
"ineligibleAction": "<string>",
"kind": "<string>",
"format": "<string>",
"position": "<string>",
"eyebrow": "<string>",
"imagePlacement": "<string>",
"buttons": [
{}
],
"data": {},
"expiresAfterDays": {},
"pinned": true,
"style": {},
"label": "<string>",
"previewText": "<string>",
"isTransactional": true,
"senderProfileId": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"replyProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"ccEmails": [
"<string>"
],
"bccEmails": [
"<string>"
],
"attachments": [
{}
],
"blocks": [
{}
],
"html": "<string>",
"delay": {
"mode": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"untilDateField": "<string>",
"untilDateSource": "<string>",
"untilOffsetDirection": "<string>",
"untilMissingAction": "<string>",
"untilPastAction": "<string>"
},
"waitUntil": {
"field": "<string>",
"source": "<string>",
"offset": {},
"direction": "<string>",
"missingAction": "<string>",
"pastAction": "<string>"
},
"waitUntilWeekday": {
"day": "<string>",
"days": [
{}
],
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"timezoneSource": "<string>",
"minimumWait": {}
},
"waitUntilKeyDate": {
"key": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"direction": "<string>",
"pastAction": "<string>",
"missingAction": "<string>"
},
"delayMs": 123,
"name": "<string>",
"discount": {
"label": "<string>",
"provider": "<string>",
"discountType": "<string>",
"percentOff": 123,
"amountOff": 123,
"currency": "<string>",
"duration": "<string>",
"durationInMonths": 123,
"appliesToAllPlans": true,
"planIds": [
{}
],
"codePrefix": "<string>",
"maxRedemptions": 123,
"lockToSubscriber": true,
"expiresAt": "<string>",
"expiresInHours": 123,
"name": "<string>"
}
}
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/sequences"
payload = {
"name": "<string>",
"description": "<string>",
"labels": ["<string>"],
"userCancellable": True,
"activeSubscribersOnly": True,
"bccEmails": ["<string>"],
"trigger": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"senderProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"replyProfileId": "<string>",
"listId": "<string>",
"listIds": ["<string>"],
"listScope": "<string>",
"tagName": "<string>",
"tagNames": ["<string>"],
"segmentId": "<string>",
"stopOnSegmentExit": True,
"eventName": "<string>",
"integrationSlug": "<string>",
"integrationEventKey": "<string>",
"customIntegration": {},
"propertyFilters": [
{
"path": "<string>",
"operator": "<string>",
"value": {}
}
],
"inactiveDays": 123,
"inactivityBaseline": "<string>",
"minCount": 123,
"timeWindowDays": 123,
"enrollmentMode": "<string>",
"enrollmentFieldPath": "<string>",
"sendingWindow": {
"enabled": True,
"timezone": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"days": [{}]
},
"frequencyCapEnabled": True,
"keyDates": {
"timezone": "<string>",
"dates": [{}]
},
"stopCondition": {},
"goal": "<string>",
"emailCount": 123,
"durationDays": 123,
"emailStyle": "<string>",
"steps": [
{
"type": "<string>",
"nodeType": "<string>",
"config": {},
"subject": "<string>",
"text": "<string>",
"imageUrls": [{}],
"title": "<string>",
"body": "<string>",
"url": {},
"imageUrl": {},
"iconUrl": {},
"platforms": ["<string>"],
"ineligibleAction": "<string>",
"kind": "<string>",
"format": "<string>",
"position": "<string>",
"eyebrow": "<string>",
"imagePlacement": "<string>",
"buttons": [{}],
"data": {},
"expiresAfterDays": {},
"pinned": True,
"style": {},
"label": "<string>",
"previewText": "<string>",
"isTransactional": True,
"senderProfileId": "<string>",
"fromEmail": "<string>",
"fromName": "<string>",
"replyProfileId": "<string>",
"replyTo": "<string>",
"replyToName": "<string>",
"ccEmails": ["<string>"],
"bccEmails": ["<string>"],
"attachments": [{}],
"blocks": [{}],
"html": "<string>",
"delay": {
"mode": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"untilDateField": "<string>",
"untilDateSource": "<string>",
"untilOffsetDirection": "<string>",
"untilMissingAction": "<string>",
"untilPastAction": "<string>"
},
"waitUntil": {
"field": "<string>",
"source": "<string>",
"offset": {},
"direction": "<string>",
"missingAction": "<string>",
"pastAction": "<string>"
},
"waitUntilWeekday": {
"day": "<string>",
"days": [{}],
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"timezoneSource": "<string>",
"minimumWait": {}
},
"waitUntilKeyDate": {
"key": "<string>",
"days": 123,
"hours": 123,
"minutes": 123,
"direction": "<string>",
"pastAction": "<string>",
"missingAction": "<string>"
},
"delayMs": 123,
"name": "<string>",
"discount": {
"label": "<string>",
"provider": "<string>",
"discountType": "<string>",
"percentOff": 123,
"amountOff": 123,
"currency": "<string>",
"duration": "<string>",
"durationInMonths": 123,
"appliesToAllPlans": True,
"planIds": [{}],
"codePrefix": "<string>",
"maxRedemptions": 123,
"lockToSubscriber": True,
"expiresAt": "<string>",
"expiresInHours": 123,
"name": "<string>"
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
labels: ['<string>'],
userCancellable: true,
activeSubscribersOnly: true,
bccEmails: ['<string>'],
trigger: '<string>',
fromEmail: '<string>',
fromName: '<string>',
senderProfileId: '<string>',
replyTo: '<string>',
replyToName: '<string>',
replyProfileId: '<string>',
listId: '<string>',
listIds: ['<string>'],
listScope: '<string>',
tagName: '<string>',
tagNames: ['<string>'],
segmentId: '<string>',
stopOnSegmentExit: true,
eventName: '<string>',
integrationSlug: '<string>',
integrationEventKey: '<string>',
customIntegration: {},
propertyFilters: [{path: '<string>', operator: '<string>', value: {}}],
inactiveDays: 123,
inactivityBaseline: '<string>',
minCount: 123,
timeWindowDays: 123,
enrollmentMode: '<string>',
enrollmentFieldPath: '<string>',
sendingWindow: {
enabled: true,
timezone: '<string>',
startTime: '<string>',
endTime: '<string>',
days: [{}]
},
frequencyCapEnabled: true,
keyDates: {timezone: '<string>', dates: [{}]},
stopCondition: {},
goal: '<string>',
emailCount: 123,
durationDays: 123,
emailStyle: '<string>',
steps: [
{
type: '<string>',
nodeType: '<string>',
config: {},
subject: '<string>',
text: '<string>',
imageUrls: [{}],
title: '<string>',
body: JSON.stringify('<string>'),
url: {},
imageUrl: {},
iconUrl: {},
platforms: ['<string>'],
ineligibleAction: '<string>',
kind: '<string>',
format: '<string>',
position: '<string>',
eyebrow: '<string>',
imagePlacement: '<string>',
buttons: [{}],
data: {},
expiresAfterDays: {},
pinned: true,
style: {},
label: '<string>',
previewText: '<string>',
isTransactional: true,
senderProfileId: '<string>',
fromEmail: '<string>',
fromName: '<string>',
replyProfileId: '<string>',
replyTo: '<string>',
replyToName: '<string>',
ccEmails: ['<string>'],
bccEmails: ['<string>'],
attachments: [{}],
blocks: [{}],
html: '<string>',
delay: {
mode: '<string>',
days: 123,
hours: 123,
minutes: 123,
untilDateField: '<string>',
untilDateSource: '<string>',
untilOffsetDirection: '<string>',
untilMissingAction: '<string>',
untilPastAction: '<string>'
},
waitUntil: {
field: '<string>',
source: '<string>',
offset: {},
direction: '<string>',
missingAction: '<string>',
pastAction: '<string>'
},
waitUntilWeekday: {
day: '<string>',
days: [{}],
startTime: '<string>',
endTime: '<string>',
timezone: '<string>',
timezoneSource: '<string>',
minimumWait: {}
},
waitUntilKeyDate: {
key: '<string>',
days: 123,
hours: 123,
minutes: 123,
direction: '<string>',
pastAction: '<string>',
missingAction: '<string>'
},
delayMs: 123,
name: '<string>',
discount: {
label: '<string>',
provider: '<string>',
discountType: '<string>',
percentOff: 123,
amountOff: 123,
currency: '<string>',
duration: '<string>',
durationInMonths: 123,
appliesToAllPlans: true,
planIds: [{}],
codePrefix: '<string>',
maxRedemptions: 123,
lockToSubscriber: true,
expiresAt: '<string>',
expiresInHours: 123,
name: '<string>'
}
}
]
})
};
fetch('https://api.sequenzy.com/api/v1/sequences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/sequences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'labels' => [
'<string>'
],
'userCancellable' => true,
'activeSubscribersOnly' => true,
'bccEmails' => [
'<string>'
],
'trigger' => '<string>',
'fromEmail' => '<string>',
'fromName' => '<string>',
'senderProfileId' => '<string>',
'replyTo' => '<string>',
'replyToName' => '<string>',
'replyProfileId' => '<string>',
'listId' => '<string>',
'listIds' => [
'<string>'
],
'listScope' => '<string>',
'tagName' => '<string>',
'tagNames' => [
'<string>'
],
'segmentId' => '<string>',
'stopOnSegmentExit' => true,
'eventName' => '<string>',
'integrationSlug' => '<string>',
'integrationEventKey' => '<string>',
'customIntegration' => [
],
'propertyFilters' => [
[
'path' => '<string>',
'operator' => '<string>',
'value' => [
]
]
],
'inactiveDays' => 123,
'inactivityBaseline' => '<string>',
'minCount' => 123,
'timeWindowDays' => 123,
'enrollmentMode' => '<string>',
'enrollmentFieldPath' => '<string>',
'sendingWindow' => [
'enabled' => true,
'timezone' => '<string>',
'startTime' => '<string>',
'endTime' => '<string>',
'days' => [
[
]
]
],
'frequencyCapEnabled' => true,
'keyDates' => [
'timezone' => '<string>',
'dates' => [
[
]
]
],
'stopCondition' => [
],
'goal' => '<string>',
'emailCount' => 123,
'durationDays' => 123,
'emailStyle' => '<string>',
'steps' => [
[
'type' => '<string>',
'nodeType' => '<string>',
'config' => [
],
'subject' => '<string>',
'text' => '<string>',
'imageUrls' => [
[
]
],
'title' => '<string>',
'body' => '<string>',
'url' => [
],
'imageUrl' => [
],
'iconUrl' => [
],
'platforms' => [
'<string>'
],
'ineligibleAction' => '<string>',
'kind' => '<string>',
'format' => '<string>',
'position' => '<string>',
'eyebrow' => '<string>',
'imagePlacement' => '<string>',
'buttons' => [
[
]
],
'data' => [
],
'expiresAfterDays' => [
],
'pinned' => true,
'style' => [
],
'label' => '<string>',
'previewText' => '<string>',
'isTransactional' => true,
'senderProfileId' => '<string>',
'fromEmail' => '<string>',
'fromName' => '<string>',
'replyProfileId' => '<string>',
'replyTo' => '<string>',
'replyToName' => '<string>',
'ccEmails' => [
'<string>'
],
'bccEmails' => [
'<string>'
],
'attachments' => [
[
]
],
'blocks' => [
[
]
],
'html' => '<string>',
'delay' => [
'mode' => '<string>',
'days' => 123,
'hours' => 123,
'minutes' => 123,
'untilDateField' => '<string>',
'untilDateSource' => '<string>',
'untilOffsetDirection' => '<string>',
'untilMissingAction' => '<string>',
'untilPastAction' => '<string>'
],
'waitUntil' => [
'field' => '<string>',
'source' => '<string>',
'offset' => [
],
'direction' => '<string>',
'missingAction' => '<string>',
'pastAction' => '<string>'
],
'waitUntilWeekday' => [
'day' => '<string>',
'days' => [
[
]
],
'startTime' => '<string>',
'endTime' => '<string>',
'timezone' => '<string>',
'timezoneSource' => '<string>',
'minimumWait' => [
]
],
'waitUntilKeyDate' => [
'key' => '<string>',
'days' => 123,
'hours' => 123,
'minutes' => 123,
'direction' => '<string>',
'pastAction' => '<string>',
'missingAction' => '<string>'
],
'delayMs' => 123,
'name' => '<string>',
'discount' => [
'label' => '<string>',
'provider' => '<string>',
'discountType' => '<string>',
'percentOff' => 123,
'amountOff' => 123,
'currency' => '<string>',
'duration' => '<string>',
'durationInMonths' => 123,
'appliesToAllPlans' => true,
'planIds' => [
[
]
],
'codePrefix' => '<string>',
'maxRedemptions' => 123,
'lockToSubscriber' => true,
'expiresAt' => '<string>',
'expiresInHours' => 123,
'name' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/sequences"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"userCancellable\": true,\n \"activeSubscribersOnly\": true,\n \"bccEmails\": [\n \"<string>\"\n ],\n \"trigger\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"senderProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"listId\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"listScope\": \"<string>\",\n \"tagName\": \"<string>\",\n \"tagNames\": [\n \"<string>\"\n ],\n \"segmentId\": \"<string>\",\n \"stopOnSegmentExit\": true,\n \"eventName\": \"<string>\",\n \"integrationSlug\": \"<string>\",\n \"integrationEventKey\": \"<string>\",\n \"customIntegration\": {},\n \"propertyFilters\": [\n {\n \"path\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": {}\n }\n ],\n \"inactiveDays\": 123,\n \"inactivityBaseline\": \"<string>\",\n \"minCount\": 123,\n \"timeWindowDays\": 123,\n \"enrollmentMode\": \"<string>\",\n \"enrollmentFieldPath\": \"<string>\",\n \"sendingWindow\": {\n \"enabled\": true,\n \"timezone\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"days\": [\n {}\n ]\n },\n \"frequencyCapEnabled\": true,\n \"keyDates\": {\n \"timezone\": \"<string>\",\n \"dates\": [\n {}\n ]\n },\n \"stopCondition\": {},\n \"goal\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123,\n \"emailStyle\": \"<string>\",\n \"steps\": [\n {\n \"type\": \"<string>\",\n \"nodeType\": \"<string>\",\n \"config\": {},\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"imageUrls\": [\n {}\n ],\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": {},\n \"imageUrl\": {},\n \"iconUrl\": {},\n \"platforms\": [\n \"<string>\"\n ],\n \"ineligibleAction\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"position\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"imagePlacement\": \"<string>\",\n \"buttons\": [\n {}\n ],\n \"data\": {},\n \"expiresAfterDays\": {},\n \"pinned\": true,\n \"style\": {},\n \"label\": \"<string>\",\n \"previewText\": \"<string>\",\n \"isTransactional\": true,\n \"senderProfileId\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"ccEmails\": [\n \"<string>\"\n ],\n \"bccEmails\": [\n \"<string>\"\n ],\n \"attachments\": [\n {}\n ],\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"delay\": {\n \"mode\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"untilDateField\": \"<string>\",\n \"untilDateSource\": \"<string>\",\n \"untilOffsetDirection\": \"<string>\",\n \"untilMissingAction\": \"<string>\",\n \"untilPastAction\": \"<string>\"\n },\n \"waitUntil\": {\n \"field\": \"<string>\",\n \"source\": \"<string>\",\n \"offset\": {},\n \"direction\": \"<string>\",\n \"missingAction\": \"<string>\",\n \"pastAction\": \"<string>\"\n },\n \"waitUntilWeekday\": {\n \"day\": \"<string>\",\n \"days\": [\n {}\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"timezoneSource\": \"<string>\",\n \"minimumWait\": {}\n },\n \"waitUntilKeyDate\": {\n \"key\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"direction\": \"<string>\",\n \"pastAction\": \"<string>\",\n \"missingAction\": \"<string>\"\n },\n \"delayMs\": 123,\n \"name\": \"<string>\",\n \"discount\": {\n \"label\": \"<string>\",\n \"provider\": \"<string>\",\n \"discountType\": \"<string>\",\n \"percentOff\": 123,\n \"amountOff\": 123,\n \"currency\": \"<string>\",\n \"duration\": \"<string>\",\n \"durationInMonths\": 123,\n \"appliesToAllPlans\": true,\n \"planIds\": [\n {}\n ],\n \"codePrefix\": \"<string>\",\n \"maxRedemptions\": 123,\n \"lockToSubscriber\": true,\n \"expiresAt\": \"<string>\",\n \"expiresInHours\": 123,\n \"name\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/sequences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"userCancellable\": true,\n \"activeSubscribersOnly\": true,\n \"bccEmails\": [\n \"<string>\"\n ],\n \"trigger\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"senderProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"listId\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"listScope\": \"<string>\",\n \"tagName\": \"<string>\",\n \"tagNames\": [\n \"<string>\"\n ],\n \"segmentId\": \"<string>\",\n \"stopOnSegmentExit\": true,\n \"eventName\": \"<string>\",\n \"integrationSlug\": \"<string>\",\n \"integrationEventKey\": \"<string>\",\n \"customIntegration\": {},\n \"propertyFilters\": [\n {\n \"path\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": {}\n }\n ],\n \"inactiveDays\": 123,\n \"inactivityBaseline\": \"<string>\",\n \"minCount\": 123,\n \"timeWindowDays\": 123,\n \"enrollmentMode\": \"<string>\",\n \"enrollmentFieldPath\": \"<string>\",\n \"sendingWindow\": {\n \"enabled\": true,\n \"timezone\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"days\": [\n {}\n ]\n },\n \"frequencyCapEnabled\": true,\n \"keyDates\": {\n \"timezone\": \"<string>\",\n \"dates\": [\n {}\n ]\n },\n \"stopCondition\": {},\n \"goal\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123,\n \"emailStyle\": \"<string>\",\n \"steps\": [\n {\n \"type\": \"<string>\",\n \"nodeType\": \"<string>\",\n \"config\": {},\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"imageUrls\": [\n {}\n ],\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": {},\n \"imageUrl\": {},\n \"iconUrl\": {},\n \"platforms\": [\n \"<string>\"\n ],\n \"ineligibleAction\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"position\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"imagePlacement\": \"<string>\",\n \"buttons\": [\n {}\n ],\n \"data\": {},\n \"expiresAfterDays\": {},\n \"pinned\": true,\n \"style\": {},\n \"label\": \"<string>\",\n \"previewText\": \"<string>\",\n \"isTransactional\": true,\n \"senderProfileId\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"ccEmails\": [\n \"<string>\"\n ],\n \"bccEmails\": [\n \"<string>\"\n ],\n \"attachments\": [\n {}\n ],\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"delay\": {\n \"mode\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"untilDateField\": \"<string>\",\n \"untilDateSource\": \"<string>\",\n \"untilOffsetDirection\": \"<string>\",\n \"untilMissingAction\": \"<string>\",\n \"untilPastAction\": \"<string>\"\n },\n \"waitUntil\": {\n \"field\": \"<string>\",\n \"source\": \"<string>\",\n \"offset\": {},\n \"direction\": \"<string>\",\n \"missingAction\": \"<string>\",\n \"pastAction\": \"<string>\"\n },\n \"waitUntilWeekday\": {\n \"day\": \"<string>\",\n \"days\": [\n {}\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"timezoneSource\": \"<string>\",\n \"minimumWait\": {}\n },\n \"waitUntilKeyDate\": {\n \"key\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"direction\": \"<string>\",\n \"pastAction\": \"<string>\",\n \"missingAction\": \"<string>\"\n },\n \"delayMs\": 123,\n \"name\": \"<string>\",\n \"discount\": {\n \"label\": \"<string>\",\n \"provider\": \"<string>\",\n \"discountType\": \"<string>\",\n \"percentOff\": 123,\n \"amountOff\": 123,\n \"currency\": \"<string>\",\n \"duration\": \"<string>\",\n \"durationInMonths\": 123,\n \"appliesToAllPlans\": true,\n \"planIds\": [\n {}\n ],\n \"codePrefix\": \"<string>\",\n \"maxRedemptions\": 123,\n \"lockToSubscriber\": true,\n \"expiresAt\": \"<string>\",\n \"expiresInHours\": 123,\n \"name\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/sequences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"userCancellable\": true,\n \"activeSubscribersOnly\": true,\n \"bccEmails\": [\n \"<string>\"\n ],\n \"trigger\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"senderProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"listId\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"listScope\": \"<string>\",\n \"tagName\": \"<string>\",\n \"tagNames\": [\n \"<string>\"\n ],\n \"segmentId\": \"<string>\",\n \"stopOnSegmentExit\": true,\n \"eventName\": \"<string>\",\n \"integrationSlug\": \"<string>\",\n \"integrationEventKey\": \"<string>\",\n \"customIntegration\": {},\n \"propertyFilters\": [\n {\n \"path\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": {}\n }\n ],\n \"inactiveDays\": 123,\n \"inactivityBaseline\": \"<string>\",\n \"minCount\": 123,\n \"timeWindowDays\": 123,\n \"enrollmentMode\": \"<string>\",\n \"enrollmentFieldPath\": \"<string>\",\n \"sendingWindow\": {\n \"enabled\": true,\n \"timezone\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"days\": [\n {}\n ]\n },\n \"frequencyCapEnabled\": true,\n \"keyDates\": {\n \"timezone\": \"<string>\",\n \"dates\": [\n {}\n ]\n },\n \"stopCondition\": {},\n \"goal\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123,\n \"emailStyle\": \"<string>\",\n \"steps\": [\n {\n \"type\": \"<string>\",\n \"nodeType\": \"<string>\",\n \"config\": {},\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"imageUrls\": [\n {}\n ],\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": {},\n \"imageUrl\": {},\n \"iconUrl\": {},\n \"platforms\": [\n \"<string>\"\n ],\n \"ineligibleAction\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"position\": \"<string>\",\n \"eyebrow\": \"<string>\",\n \"imagePlacement\": \"<string>\",\n \"buttons\": [\n {}\n ],\n \"data\": {},\n \"expiresAfterDays\": {},\n \"pinned\": true,\n \"style\": {},\n \"label\": \"<string>\",\n \"previewText\": \"<string>\",\n \"isTransactional\": true,\n \"senderProfileId\": \"<string>\",\n \"fromEmail\": \"<string>\",\n \"fromName\": \"<string>\",\n \"replyProfileId\": \"<string>\",\n \"replyTo\": \"<string>\",\n \"replyToName\": \"<string>\",\n \"ccEmails\": [\n \"<string>\"\n ],\n \"bccEmails\": [\n \"<string>\"\n ],\n \"attachments\": [\n {}\n ],\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"delay\": {\n \"mode\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"untilDateField\": \"<string>\",\n \"untilDateSource\": \"<string>\",\n \"untilOffsetDirection\": \"<string>\",\n \"untilMissingAction\": \"<string>\",\n \"untilPastAction\": \"<string>\"\n },\n \"waitUntil\": {\n \"field\": \"<string>\",\n \"source\": \"<string>\",\n \"offset\": {},\n \"direction\": \"<string>\",\n \"missingAction\": \"<string>\",\n \"pastAction\": \"<string>\"\n },\n \"waitUntilWeekday\": {\n \"day\": \"<string>\",\n \"days\": [\n {}\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"timezoneSource\": \"<string>\",\n \"minimumWait\": {}\n },\n \"waitUntilKeyDate\": {\n \"key\": \"<string>\",\n \"days\": 123,\n \"hours\": 123,\n \"minutes\": 123,\n \"direction\": \"<string>\",\n \"pastAction\": \"<string>\",\n \"missingAction\": \"<string>\"\n },\n \"delayMs\": 123,\n \"name\": \"<string>\",\n \"discount\": {\n \"label\": \"<string>\",\n \"provider\": \"<string>\",\n \"discountType\": \"<string>\",\n \"percentOff\": 123,\n \"amountOff\": 123,\n \"currency\": \"<string>\",\n \"duration\": \"<string>\",\n \"durationInMonths\": 123,\n \"appliesToAllPlans\": true,\n \"planIds\": [\n {}\n ],\n \"codePrefix\": \"<string>\",\n \"maxRedemptions\": 123,\n \"lockToSubscriber\": true,\n \"expiresAt\": \"<string>\",\n \"expiresInHours\": 123,\n \"name\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Sequence created. AI is generating email content based on your brand. This typically takes 30-60 seconds.",
"sequence": {
"id": "seq_abc123",
"name": "Onboarding Sequence",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 5,
"sendingWindow": {
"enabled": true,
"timezone": "Europe/Kiev",
"startTime": "08:00",
"endTime": "20:00",
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
}
}
}
{
"success": true,
"message": "Sequence created with 2 emails and 1 discount action spanning 1 day. Use POST /api/v1/sequences/{id}/enable to activate.",
"sequence": {
"id": "seq_abc123",
"name": "Welcome Sequence",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 2,
"discountCount": 1,
"nodeCount": 6,
"sendingWindow": null
}
}
{
"success": true,
"message": "Sequence created with 1 email. Use POST /api/v1/sequences/{id}/enable to activate. Add the custom event feed using eventTrackingCode and eventTracking before enabling.",
"sequence": {
"id": "seq_abc123",
"name": "Trial Started",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 1,
"nodeCount": 3
},
"eventTrackingCode": "await fetch(\"https://api.sequenzy.com/api/v1/subscribers/events\", { ... properties: { trial_id: \"<trial_id>\" } ... });",
"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": {
"required": ["event", "properties"],
"identity": "Provide email or externalId. Email is required when the subscriber does not already exist.",
"event": "Must equal \"trial.started\".",
"requiredPropertyPaths": ["trial_id"]
},
"examplePayload": {
"email": "user@example.com",
"event": "trial.started",
"properties": { "trial_id": "<trial_id>" }
},
"examplePayloadMatchesFilters": true
},
"requiredEvents": ["trial.started"]
}
{
"success": true,
"message": "Sequence created with 6 emails. Use POST /api/v1/sequences/{id}/enable to activate.",
"sequence": {
"id": "seq_abc123",
"name": "Welcome series",
"status": "draft",
"enrollmentPaused": false,
"effectiveStatus": "draft",
"acceptsNewEnrollments": false,
"processesExistingEnrollments": false,
"effectiveStatusSummary": "Draft. Nobody is enrolled and no emails are sent.",
"emailCount": 6,
"sendingWindow": null
},
"warnings": [
"Ignored unknown field \"triggerConfig\". Send trigger settings as top-level fields such as \"trigger\", \"listId\", \"listIds\", \"tagName\", \"segmentId\" and \"eventName\".",
"Ignored \"steps[1].delay\": expected an object, so step 2 was saved without this delay. Use \"delay\": { \"days\": 2 } (days, hours, minutes) or \"delayMs\".",
"This contact_added sequence has no list and no \"listScope\", so once enabled it enrolls every contact added to this company. Send \"listId\" to limit it to one list, or \"listScope\": \"any_contact\" to keep this behavior."
]
}
{
"error": "Either 'goal' (for AI generation) or 'steps' (for explicit content) is required"
}
{
"error": "Step 1: either 'blocks' or 'html' is required"
}
{
"error": "Step 1: invalid block at 0.url: Invalid input: expected string, received undefined"
}
{
"error": "Step 1: expiresAt must be in the future"
}
{
"error": "Invalid trigger type 'invalid'. Valid types: contact_added, tag_added, segment_entered, segment_exited, event_received, inbound_webhook, inactivity, frequency, manual"
}
{
"error": "propertyFilters is only supported for the event_received trigger"
}
{
"error": "propertyFilters[0].value is required for the 'equals' operator"
}
{
"error": "emailCount must be no more than 10"
}
{
"error": "Invalid API key"
}
{
"error": "No companies found. Create a company first using the create_company tool."
}
{
"type": "validation",
"on": "body",
"property": "/enrollmentMode",
"message": "Expected union value",
"summary": "Property 'enrollmentMode' must be one of: unlimited, one_time, matching_field",
"found": { "name": "Welcome series", "enrollmentMode": "once" },
"errors": [
{
"path": "/enrollmentMode",
"message": "Expected union value",
"summary": "Property 'enrollmentMode' must be one of: unlimited, one_time, matching_field",
"allowedValues": ["unlimited", "one_time", "matching_field"]
}
]
}