curl --request PUT \
--url https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"label": "<string>",
"trigger_type": "<string>",
"trigger_params": {},
"priority": 123,
"is_active": true,
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [
{}
]
}
]
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}"
payload = {
"label": "<string>",
"trigger_type": "<string>",
"trigger_params": {},
"priority": 123,
"is_active": True,
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [{}]
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
trigger_type: '<string>',
trigger_params: {},
priority: 123,
is_active: true,
steps: [{wait_seconds: 1, condition_type: 'ALWAYS', label: '<string>', variants: [{}]}]
})
};
fetch('https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}', 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/{subsequence_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'trigger_type' => '<string>',
'trigger_params' => [
],
'priority' => 123,
'is_active' => true,
'steps' => [
[
'wait_seconds' => 1,
'condition_type' => 'ALWAYS',
'label' => '<string>',
'variants' => [
[
]
]
]
]
]),
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/{subsequence_id}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"trigger_type\": \"<string>\",\n \"trigger_params\": {},\n \"priority\": 123,\n \"is_active\": true,\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"trigger_type\": \"<string>\",\n \"trigger_params\": {},\n \"priority\": 123,\n \"is_active\": true,\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"trigger_type\": \"<string>\",\n \"trigger_params\": {},\n \"priority\": 123,\n \"is_active\": true,\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ]\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>"
}
]
}Update a subsequence
Update a subsequence branch
Partial update — only the fields you send are changed. subsequence_id is
the branch’s entry edge id, as returned on create or read from
GET /campaigns/{id}/flow.
Updating steps
When steps is present it replaces the whole chain, but the service
reconciles positionally against the persisted nodes rather than deleting
and recreating them. Step 1 edits step 1, step 2 edits step 2, and so on;
extra steps are appended and surplus nodes removed. This matters because
leads already enrolled in the branch hold references to those node ids —
recreating them would orphan live enrollments.
An empty steps list is rejected with a 400; delete the branch instead.
As on create, condition_type between steps should stay ALWAYS and step
timing is wait_seconds.
Example Usage
import requests
campaign_id = "550e8400-e29b-41d4-a716-446655440000"
subsequence_id = "750e8400-e29b-41d4-a716-446655440000"
response = requests.put(
f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}",
headers={"X-API-Key": "your-api-key"},
json={"label": "Interested - nurture v2", "priority": 20}
)
print(response.json())
curl --request PUT \
--url https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"label": "<string>",
"trigger_type": "<string>",
"trigger_params": {},
"priority": 123,
"is_active": true,
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [
{}
]
}
]
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}"
payload = {
"label": "<string>",
"trigger_type": "<string>",
"trigger_params": {},
"priority": 123,
"is_active": True,
"steps": [
{
"wait_seconds": 1,
"condition_type": "ALWAYS",
"label": "<string>",
"variants": [{}]
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
trigger_type: '<string>',
trigger_params: {},
priority: 123,
is_active: true,
steps: [{wait_seconds: 1, condition_type: 'ALWAYS', label: '<string>', variants: [{}]}]
})
};
fetch('https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}', 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/{subsequence_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'trigger_type' => '<string>',
'trigger_params' => [
],
'priority' => 123,
'is_active' => true,
'steps' => [
[
'wait_seconds' => 1,
'condition_type' => 'ALWAYS',
'label' => '<string>',
'variants' => [
[
]
]
]
]
]),
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/{subsequence_id}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"trigger_type\": \"<string>\",\n \"trigger_params\": {},\n \"priority\": 123,\n \"is_active\": true,\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"trigger_type\": \"<string>\",\n \"trigger_params\": {},\n \"priority\": 123,\n \"is_active\": true,\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow/subsequences/{subsequence_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"trigger_type\": \"<string>\",\n \"trigger_params\": {},\n \"priority\": 123,\n \"is_active\": true,\n \"steps\": [\n {\n \"wait_seconds\": 1,\n \"condition_type\": \"ALWAYS\",\n \"label\": \"<string>\",\n \"variants\": [\n {}\n ]\n }\n ]\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
Body
Request to update a subsequence (label, entry edge params, and steps).
Response
Subsequence updated
Was this page helpful?

