Delete Node
curl --request DELETE \
--url https://app.pixie.ai/api/campaigns/{id}/sequence/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nodeId": "<string>"
}
'import requests
url = "https://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload = { "nodeId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nodeId: '<string>'})
};
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 => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'nodeId' => '<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://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload := strings.NewReader("{\n \"nodeId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://app.pixie.ai/api/campaigns/{id}/sequence/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nodeId\": \"<string>\"\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::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nodeId\": \"<string>\"\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
Delete Node
Remove a node from a draft campaign’s sequence and re-pack remaining positions.
DELETE
/
api
/
campaigns
/
{id}
/
sequence
/
nodes
Delete Node
curl --request DELETE \
--url https://app.pixie.ai/api/campaigns/{id}/sequence/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nodeId": "<string>"
}
'import requests
url = "https://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload = { "nodeId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nodeId: '<string>'})
};
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 => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'nodeId' => '<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://app.pixie.ai/api/campaigns/{id}/sequence/nodes"
payload := strings.NewReader("{\n \"nodeId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://app.pixie.ai/api/campaigns/{id}/sequence/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nodeId\": \"<string>\"\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::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nodeId\": \"<string>\"\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:
pixie campaign sequence node delete --id <id> --node-id <node-id>
Overview
Removes a node from the sequence by id. Draft campaigns only — every mutation on this collection is gated onstatus === "draft".
The nodeId travels in the JSON body, not the URL — the collection endpoint serves all three mutation verbs (POST add, PATCH move, DELETE remove) and keys off the body. The backing Postgres RPC holds a row-level lock while deleting and re-packing remaining nodes to contiguous 0-indexed positions, so concurrent mutations can’t corrupt the order.
Related operations
- Add a sequence node —
POSTto insert. - Update a sequence node —
PUTto edit content. - Get a campaign — returns the fresh
sequence_nodeslist.
AI agent notes
Don’t delete the
end node. Every campaign needs a terminal end marker. Removing it will leave the campaign unlaunchable.Positions re-pack automatically. After deletion, remaining nodes shift down so positions stay contiguous (0, 1, 2, …). You don’t need to follow up with moveSequenceNode calls.Read-back fallback. Normal response is { sequence_nodes: [...] }. If the post-mutation read-back fails, the server returns { mutated: true }; in that case refetch via GET /api/campaigns/{id}.Irreversible. There is no soft-delete. Confirm with the human before deleting if the node has been hand-authored content (subject, body, AI purpose).Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Campaign UUID
Body
application/json
String value with endpoint-specific validation.
Response
Node deleted. 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?