Get campaign flow graph
curl --request GET \
--url https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subsequences_enabled": true,
"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>"
}
]
}Flow
Get campaign flow graph
Read a campaign’s full flow graph
Returns every node and edge in the campaign’s flow: the MAIN follow-up chain
and any subsequence branches hanging off it, plus subsequences_enabled.
Reading the graph
- nodes —
node_groupisMAINfor the linear follow-up chain andSUBSEQUENCEfor branch steps;node_typeisEMAILorEXIT. - variants — populated on
SUBSEQUENCEnodes only, because a branch step has nosequencesrow and this is the only place its content is served. MAIN nodes staynull: their content comes fromGET /campaigns/{id}instead. Variant fields aresubject/body/html_body/weighton the wire (the columns aresubject_template/body_template/html_template/distribution_percent). - edges —
kindisTIMEOUT(wait, then evaluatecondition_type) orEVENT(a branch entry trigger). A branch’s entry edge id is thesubsequence_idused by the update and delete routes.
Why ids are exposed but not editable
There is no public /nodes or /edges CRUD. Raw node and edge editing exists
to drive the in-app canvas and can easily produce a graph the worker cannot
dispatch. The ids are returned because two of them are needed as inputs:
entry_from_node_id when creating a branch, and
target_subsequence_node_id when moving leads into one.
Example Usage
import requests
campaign_id = "550e8400-e29b-41d4-a716-446655440000"
response = requests.get(
f"https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow",
headers={"X-API-Key": "your-api-key"}
)
print(response.json())
GET
/
api
/
public
/
v1
/
campaigns
/
{campaign_id}
/
flow
Get campaign flow graph
curl --request GET \
--url https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/campaigns/{campaign_id}/flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subsequences_enabled": true,
"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
Was this page helpful?

