curl --request POST \
--url https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"trigger_type": "<string>",
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [
{}
]
}
],
"trigger_params": {},
"entry_from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0,
"label": "<string>"
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences"
payload = {
"trigger_type": "<string>",
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [{}]
}
],
"trigger_params": {},
"entry_from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0,
"label": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trigger_type: '<string>',
steps: [{wait_seconds: 1, condition_type: 'ALWAYS', label: '<string>', variants: [{}]}],
trigger_params: {},
entry_from_node_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
priority: 0,
label: '<string>'
})
};
fetch('https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences', 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.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences",
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([
'trigger_type' => '<string>',
'steps' => [
[
'wait_seconds' => 1,
'condition_type' => 'ALWAYS',
'label' => '<string>',
'variants' => [
[
]
]
]
],
'trigger_params' => [
],
'entry_from_node_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'priority' => 0,
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences"
payload := strings.NewReader("{\n \"trigger_type\": \"<string>\",\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ],\n \"trigger_params\": {},\n \"entry_from_node_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0,\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"trigger_type\": \"<string>\",\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ],\n \"trigger_params\": {},\n \"entry_from_node_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0,\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"trigger_type\": \"<string>\",\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ],\n \"trigger_params\": {},\n \"entry_from_node_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0,\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"entry_edge": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"condition_type": "<string>",
"priority": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"condition_params": {},
"wait_seconds": 123
},
"nodes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_type": "<string>",
"node_group": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"position": {},
"variants": [
{
"variant_name": "<string>",
"variant_label": "<string>",
"subject": "<string>",
"body": "<string>",
"html_body": "<string>",
"weight": 100,
"content_type": "<string>"
}
]
}
],
"edges": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"condition_type": "<string>",
"priority": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"condition_params": {},
"wait_seconds": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create a subsequence
Create a subsequence branch
A subsequence is a conditional branch off the MAIN follow-up chain: a trigger
that pulls a lead out of the main path, plus an ordered chain of steps that
then runs for that lead. Creating the first branch on a campaign sets
subsequences_enabled to true automatically.
Entry triggers
trigger_type accepts only the three branch-entry triggers:
INTENT_TAG— the lead was tagged with any oftrigger_params.tag_names(a list of strings; the legacy single-valuetag_nameis still accepted).KEYWORD— a reply matched any oftrigger_params.phrases(a list of strings).STATUS— the lead reachedtrigger_params.status(a string).
NOT_OPENED, NOT_REPLIED and OPENED_BUT_NOT_REPLIED belong to the MAIN
follow-up chain (PUT /campaigns/{id} with sequences) and are rejected
here with a 422.
entry_from_node_id is optional — omit it and the campaign’s root MAIN node
is resolved for you. Pass it only to branch off a later step; get node ids
from GET /campaigns/{id}/flow.
Steps
Each step needs wait_seconds (not wait_days as on the MAIN chain) and its
variants. Leave condition_type alone: it defaults to ALWAYS, which is
what a between-branch-steps timeout should be. A branch is entered because
something happened, so a negative condition like NOT_REPLIED can never be
satisfied inside one and such steps are silently discarded at send time.
Variant objects use the wire field names: subject, body, html_body,
weight.
Response
Returns the entry edge (whose id is the subsequence_id for later updates
and deletes), the created nodes and the connecting edges. Nodes in this
response carry no variants — read the graph back with
GET /campaigns/{id}/flow for content.
Example Usage
import requests
campaign_id = "550e8400-e29b-41d4-a716-446655440000"
response = requests.post(
f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences",
headers={"X-API-Key": "your-api-key"},
json={
"label": "Interested - nurture",
"trigger_type": "INTENT_TAG",
"trigger_params": {"tag_names": ["interested", "asked_for_demo"]},
"priority": 10,
"steps": [
{
"wait_seconds": 3600,
"label": "Send case study",
"variants": [{
"variant_name": "A",
"subject": "The case study you asked for",
"body": "Here it is -- {{firstName}}, thought you'd like this.",
"weight": 100
}]
},
{
"wait_seconds": 259200,
"label": "Check in",
"variants": [{
"variant_name": "A",
"subject": "Any thoughts?",
"body": "Did the case study answer your questions?",
"weight": 100
}]
}
]
}
)
print(response.json())
curl --request POST \
--url https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"trigger_type": "<string>",
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [
{}
]
}
],
"trigger_params": {},
"entry_from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0,
"label": "<string>"
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences"
payload = {
"trigger_type": "<string>",
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [{}]
}
],
"trigger_params": {},
"entry_from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 0,
"label": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trigger_type: '<string>',
steps: [{wait_seconds: 1, condition_type: 'ALWAYS', label: '<string>', variants: [{}]}],
trigger_params: {},
entry_from_node_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
priority: 0,
label: '<string>'
})
};
fetch('https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences', 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.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences",
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([
'trigger_type' => '<string>',
'steps' => [
[
'wait_seconds' => 1,
'condition_type' => 'ALWAYS',
'label' => '<string>',
'variants' => [
[
]
]
]
],
'trigger_params' => [
],
'entry_from_node_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'priority' => 0,
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences"
payload := strings.NewReader("{\n \"trigger_type\": \"<string>\",\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ],\n \"trigger_params\": {},\n \"entry_from_node_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0,\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"trigger_type\": \"<string>\",\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ],\n \"trigger_params\": {},\n \"entry_from_node_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0,\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"trigger_type\": \"<string>\",\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ],\n \"trigger_params\": {},\n \"entry_from_node_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priority\": 0,\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"entry_edge": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"condition_type": "<string>",
"priority": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"condition_params": {},
"wait_seconds": 123
},
"nodes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_type": "<string>",
"node_group": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"position": {},
"variants": [
{
"variant_name": "<string>",
"variant_label": "<string>",
"subject": "<string>",
"body": "<string>",
"html_body": "<string>",
"weight": 100,
"content_type": "<string>"
}
]
}
],
"edges": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"condition_type": "<string>",
"priority": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"condition_params": {},
"wait_seconds": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key with format cs_live_xxx
Path Parameters
Body
Convenience request to create a full subsequence branch.
Bundles the entry condition (trigger type + params + priority) with a list of steps that form a linear chain of SUBSEQUENCE EMAIL nodes connected by TIMEOUT edges.
Entry trigger type: INTENT_TAG, KEYWORD, or STATUS
Ordered list of subsequence steps
1Show child attributes
Show child attributes
Trigger parameters. INTENT_TAG takes tag_names: list[str] (the legacy single-value tag_name: str is still accepted); KEYWORD takes phrases: list[str]; STATUS takes status: str.
MAIN node that triggers entry; auto-resolved when omitted
Priority of the entry EVENT edge
Subsequence label
255Response
Subsequence created
Was this page helpful?

