Add Node
curl --request POST \
--url https://app.pixie.ai/api/campaigns/{id}/sequence/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"position": 4503599627370495,
"subject": "<string>",
"body": "<string>",
"signature": "<string>",
"include_message": true,
"is_reply": true,
"delay_days": 4503599627370495,
"delay_hours": 4503599627370495,
"delay_minutes": 4503599627370495
}
'import requests
url = "https://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload = {
"position": 4503599627370495,
"subject": "<string>",
"body": "<string>",
"signature": "<string>",
"include_message": True,
"is_reply": True,
"delay_days": 4503599627370495,
"delay_hours": 4503599627370495,
"delay_minutes": 4503599627370495
}
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({
position: 4503599627370495,
subject: '<string>',
body: JSON.stringify('<string>'),
signature: '<string>',
include_message: true,
is_reply: true,
delay_days: 4503599627370495,
delay_hours: 4503599627370495,
delay_minutes: 4503599627370495
})
};
fetch('https://app.pixie.ai/api/campaigns/{id}/sequence/nodes', 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://app.pixie.ai/api/campaigns/{id}/sequence/nodes",
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([
'position' => 4503599627370495,
'subject' => '<string>',
'body' => '<string>',
'signature' => '<string>',
'include_message' => true,
'is_reply' => true,
'delay_days' => 4503599627370495,
'delay_hours' => 4503599627370495,
'delay_minutes' => 4503599627370495
]),
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://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload := strings.NewReader("{\n \"position\": 4503599627370495,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"signature\": \"<string>\",\n \"include_message\": true,\n \"is_reply\": true,\n \"delay_days\": 4503599627370495,\n \"delay_hours\": 4503599627370495,\n \"delay_minutes\": 4503599627370495\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://app.pixie.ai/api/campaigns/{id}/sequence/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"position\": 4503599627370495,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"signature\": \"<string>\",\n \"include_message\": true,\n \"is_reply\": true,\n \"delay_days\": 4503599627370495,\n \"delay_hours\": 4503599627370495,\n \"delay_minutes\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pixie.ai/api/campaigns/{id}/sequence/nodes")
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 \"position\": 4503599627370495,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"signature\": \"<string>\",\n \"include_message\": true,\n \"is_reply\": true,\n \"delay_days\": 4503599627370495,\n \"delay_hours\": 4503599627370495,\n \"delay_minutes\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"sequence_nodes": [
{
"id": "<string>",
"campaign_id": "<string>",
"position": 4503599627370495,
"type": "connection_request",
"subject": "<string>",
"body": "<string>",
"body_html": "<string>",
"signature": "<string>",
"from_name": "<string>",
"reply_to": "<string>",
"cc": "<string>",
"bcc": "<string>",
"attachments": [
"<unknown>"
],
"include_message": true,
"is_reply": true,
"delay_days": 4503599627370495,
"delay_hours": 4503599627370495,
"delay_minutes": 4503599627370495,
"ai_node": {
"output_type": "email"
}
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Outbound Sequence
Add Node
Insert a new node into a draft campaign’s sequence. Also the home page for moving and deleting nodes on the same collection.
POST
/
api
/
campaigns
/
{id}
/
sequence
/
nodes
Add Node
curl --request POST \
--url https://app.pixie.ai/api/campaigns/{id}/sequence/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"position": 4503599627370495,
"subject": "<string>",
"body": "<string>",
"signature": "<string>",
"include_message": true,
"is_reply": true,
"delay_days": 4503599627370495,
"delay_hours": 4503599627370495,
"delay_minutes": 4503599627370495
}
'import requests
url = "https://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload = {
"position": 4503599627370495,
"subject": "<string>",
"body": "<string>",
"signature": "<string>",
"include_message": True,
"is_reply": True,
"delay_days": 4503599627370495,
"delay_hours": 4503599627370495,
"delay_minutes": 4503599627370495
}
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({
position: 4503599627370495,
subject: '<string>',
body: JSON.stringify('<string>'),
signature: '<string>',
include_message: true,
is_reply: true,
delay_days: 4503599627370495,
delay_hours: 4503599627370495,
delay_minutes: 4503599627370495
})
};
fetch('https://app.pixie.ai/api/campaigns/{id}/sequence/nodes', 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://app.pixie.ai/api/campaigns/{id}/sequence/nodes",
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([
'position' => 4503599627370495,
'subject' => '<string>',
'body' => '<string>',
'signature' => '<string>',
'include_message' => true,
'is_reply' => true,
'delay_days' => 4503599627370495,
'delay_hours' => 4503599627370495,
'delay_minutes' => 4503599627370495
]),
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://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload := strings.NewReader("{\n \"position\": 4503599627370495,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"signature\": \"<string>\",\n \"include_message\": true,\n \"is_reply\": true,\n \"delay_days\": 4503599627370495,\n \"delay_hours\": 4503599627370495,\n \"delay_minutes\": 4503599627370495\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://app.pixie.ai/api/campaigns/{id}/sequence/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"position\": 4503599627370495,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"signature\": \"<string>\",\n \"include_message\": true,\n \"is_reply\": true,\n \"delay_days\": 4503599627370495,\n \"delay_hours\": 4503599627370495,\n \"delay_minutes\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pixie.ai/api/campaigns/{id}/sequence/nodes")
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 \"position\": 4503599627370495,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"signature\": \"<string>\",\n \"include_message\": true,\n \"is_reply\": true,\n \"delay_days\": 4503599627370495,\n \"delay_hours\": 4503599627370495,\n \"delay_minutes\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"sequence_nodes": [
{
"id": "<string>",
"campaign_id": "<string>",
"position": 4503599627370495,
"type": "connection_request",
"subject": "<string>",
"body": "<string>",
"body_html": "<string>",
"signature": "<string>",
"from_name": "<string>",
"reply_to": "<string>",
"cc": "<string>",
"bcc": "<string>",
"attachments": [
"<unknown>"
],
"include_message": true,
"is_reply": true,
"delay_days": 4503599627370495,
"delay_hours": 4503599627370495,
"delay_minutes": 4503599627370495,
"ai_node": {
"output_type": "email"
}
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}CLI:
To edit a node’s content (subject, body, delay values, AI purpose), use
pixie campaign sequence node add --id <id> --type <type>
pixie campaign sequence node add --id <id> --type <type> --position <position> --subject <subject> --body <body> --signature <signature> --include-message <include-message> --is-reply <is-reply> --delay-days <delay-days> --delay-hours <delay-hours> --delay-minutes <delay-minutes>
Overview
Inserts a new node into the campaign sequence. Draft campaigns only — every mutation on this collection is gated onstatus === "draft".
This collection exposes three verbs:
| Verb | Operation | Purpose |
|---|---|---|
POST | addSequenceNode | Insert a new node (this page). Omit position to drop it right before the terminal end node. |
PATCH | moveSequenceNode | Reorder an existing node — see Move a sequence node. |
DELETE | deleteSequenceNode | Remove a node — see Delete a sequence node. |
updateSequenceNode against the singular /sequence/nodes/{nodeId} route. Type is immutable after creation — to change it, delete and re-add.
Every mutation on this collection is backed by an atomic Postgres RPC with row-level locking, so concurrent adds, moves, and deletes can’t corrupt the position ordering.
AI agent notes
Typical build order.
POST /api/campaignsto create a draft.- Loop over your desired nodes and
POST /api/campaigns/{id}/sequence/nodesfor each — omitpositionand every node lands just before the auto-inserted terminalend. - When done,
POST /api/campaigns/{id}/launch.
type determines which node kinds are legal:linkedincampaigns acceptconnection_request,message,delay,ai,end.emailcampaigns acceptemail,delay,ai,end.
{ sequence_nodes: [...] } — the full list, already ordered. On the rare occasion the post-mutation read-back fails, the server returns { mutated: true, node_id }. In that case refetch via GET /api/campaigns/{id}.Position omitted = before the end. Don’t set position unless you specifically need to insert somewhere other than the natural end-of-sequence slot. The server handles ordering.AI nodes. Adding { type: "ai" } creates the base row; populate purpose and output_type with a follow-up PUT /api/campaigns/{id}/sequence/nodes/{nodeId} call.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Campaign UUID
Body
application/json
Available options:
connection_request, message, email, delay, ai, end Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Response
Node inserted. Returns the fresh ordered list, or a mutation fallback when read-back fails.
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?