Reorder Node
curl --request PATCH \
--url https://app.puffle.ai/api/campaigns/{id}/sequence/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nodeId": "<string>",
"toPosition": 4503599627370495
}
'import requests
url = "https://app.puffle.ai/api/campaigns/{id}/sequence/nodes"
payload = {
"nodeId": "<string>",
"toPosition": 4503599627370495
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nodeId: '<string>', toPosition: 4503599627370495})
};
fetch('https://app.puffle.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.puffle.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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'nodeId' => '<string>',
'toPosition' => 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.puffle.ai/api/campaigns/{id}/sequence/nodes"
payload := strings.NewReader("{\n \"nodeId\": \"<string>\",\n \"toPosition\": 4503599627370495\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.puffle.ai/api/campaigns/{id}/sequence/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nodeId\": \"<string>\",\n \"toPosition\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.puffle.ai/api/campaigns/{id}/sequence/nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nodeId\": \"<string>\",\n \"toPosition\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"sequence_nodes": [
{
"id": "<string>",
"campaign_id": "<string>",
"position": 4503599627370495,
"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": {}
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Outbound Sequence
Reorder Node
Reorder an existing node by moving it to a new position.
PATCH
/
api
/
campaigns
/
{id}
/
sequence
/
nodes
Reorder Node
curl --request PATCH \
--url https://app.puffle.ai/api/campaigns/{id}/sequence/nodes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nodeId": "<string>",
"toPosition": 4503599627370495
}
'import requests
url = "https://app.puffle.ai/api/campaigns/{id}/sequence/nodes"
payload = {
"nodeId": "<string>",
"toPosition": 4503599627370495
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nodeId: '<string>', toPosition: 4503599627370495})
};
fetch('https://app.puffle.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.puffle.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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'nodeId' => '<string>',
'toPosition' => 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.puffle.ai/api/campaigns/{id}/sequence/nodes"
payload := strings.NewReader("{\n \"nodeId\": \"<string>\",\n \"toPosition\": 4503599627370495\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.puffle.ai/api/campaigns/{id}/sequence/nodes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nodeId\": \"<string>\",\n \"toPosition\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.puffle.ai/api/campaigns/{id}/sequence/nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nodeId\": \"<string>\",\n \"toPosition\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"sequence_nodes": [
{
"id": "<string>",
"campaign_id": "<string>",
"position": 4503599627370495,
"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": {}
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}CLI:
puffle campaign sequence node move --id <id> --node-id <node-id> --to-position <to-position>
Overview
Reorder an existing node by moving it to a new position. Draft campaigns only. Uses an atomic RPC with row-level locking so concurrent moves can’t corrupt the ordering. To edit a node’s content (subject, body, delay values, etc.), useupdateSequenceNode instead.
This operation shares the URL path
/api/campaigns/{id}/sequence/nodes with other verbs. See the sibling page for related operations on the same resource.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Campaign UUID
Body
application/json
Response
Node moved. 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?
⌘I