Archive Agent Node
curl --request POST \
--url https://api.bland.ai/v2/agents/{agent_id}/archived-nodes \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '{
"node": {}
}'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/archived-nodes"
payload = { "node": {} }
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({node: {}})
};
fetch('https://api.bland.ai/v2/agents/{agent_id}/archived-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://api.bland.ai/v2/agents/{agent_id}/archived-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([
'node' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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.bland.ai/v2/agents/{agent_id}/archived-nodes"
payload := strings.NewReader("{\n \"node\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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://api.bland.ai/v2/agents/{agent_id}/archived-nodes")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"node\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/archived-nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"node\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ae798cb1-375c-425e-978f-cb2c0ccd5e29",
"agent_id": "faa42069-ed8e-4c07-bdf3-3bee134aa033",
"agent_name": "Front desk",
"name": "Holiday hours",
"kind": "scenario",
"description": "Tell the caller the office is closed for the holiday and offer to take a message.",
"node": {
"id": "db7272f8-7c8e-43f5-a442-a30883026bab",
"type": "scenario",
"position": { "x": 380, "y": 260 },
"data": {
"name": "Holiday hours",
"rule": "Tell the caller the office is closed for the holiday and offer to take a message.",
"target": { "kind": "dialogue", "label": "Holiday hours" },
"loopWhile": "",
"variables": [
{
"id": "f0bf6e1f-cffa-41bc-a615-31d426c7eb89",
"key": "callback_number",
"value": "The phone number the caller wants to be reached at",
"type": "string",
"accurateSpelling": true
}
],
"entry": {
"mode": "llm",
"label": "Asks about hours",
"description": "",
"alwaysPick": false,
"conditions": []
}
}
},
"created_at": "2026-09-10T18:21:07.442Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "INVALID_NODE",
"message": "node.type must be a non-empty string"
},
{
"error": "INVALID_NODE",
"message": "node.position must be { x: number, y: number }"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Library
Archive Agent Node
Copy a node from an agent into the organization archive.
POST
/
v2
/
agents
/
{agent_id}
/
archived-nodes
Archive Agent Node
curl --request POST \
--url https://api.bland.ai/v2/agents/{agent_id}/archived-nodes \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '{
"node": {}
}'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/archived-nodes"
payload = { "node": {} }
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({node: {}})
};
fetch('https://api.bland.ai/v2/agents/{agent_id}/archived-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://api.bland.ai/v2/agents/{agent_id}/archived-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([
'node' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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.bland.ai/v2/agents/{agent_id}/archived-nodes"
payload := strings.NewReader("{\n \"node\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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://api.bland.ai/v2/agents/{agent_id}/archived-nodes")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"node\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/archived-nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"node\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ae798cb1-375c-425e-978f-cb2c0ccd5e29",
"agent_id": "faa42069-ed8e-4c07-bdf3-3bee134aa033",
"agent_name": "Front desk",
"name": "Holiday hours",
"kind": "scenario",
"description": "Tell the caller the office is closed for the holiday and offer to take a message.",
"node": {
"id": "db7272f8-7c8e-43f5-a442-a30883026bab",
"type": "scenario",
"position": { "x": 380, "y": 260 },
"data": {
"name": "Holiday hours",
"rule": "Tell the caller the office is closed for the holiday and offer to take a message.",
"target": { "kind": "dialogue", "label": "Holiday hours" },
"loopWhile": "",
"variables": [
{
"id": "f0bf6e1f-cffa-41bc-a615-31d426c7eb89",
"key": "callback_number",
"value": "The phone number the caller wants to be reached at",
"type": "string",
"accurateSpelling": true
}
],
"entry": {
"mode": "llm",
"label": "Asks about hours",
"description": "",
"alwaysPick": false,
"conditions": []
}
}
},
"created_at": "2026-09-10T18:21:07.442Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "INVALID_NODE",
"message": "node.type must be a non-empty string"
},
{
"error": "INVALID_NODE",
"message": "node.position must be { x: number, y: number }"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Overview
Stores a self-contained copy of a node in the organization archive, attributed to this agent, so you can retire it from the canvas without losing it. Archiving never changes the agent’s graph: remove the node yourself by saving a new version with Create Agent Version. Browse the archive with List Archived Nodes. Requires an admin, owner, operator, or prompter role.Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent the node is being archived from. Returns
404 NOT_FOUND if the agent does not exist in your organization.Body Parameters
object
required
The node to archive, exactly as it appears in a version snapshot’s
behavior.nodes. Must have a non-empty string id, a non-empty string type, a position object with finite numeric x and y, and an object data. A container node’s data.flow is validated too: every nested node needs id, position, and data, every nested edge needs string id, source, and target that reference nodes in the same flow, and flows may nest at most 10 levels deep. The serialized node may not exceed 1,048,576 bytes. Returns 400 INVALID_NODE with one error entry per problem.Response
Returns201 on success.
object
The new archive entry.
Show archived node object
Show archived node object
string
Unique identifier for the archive entry. Use it with Delete Archived Node.
string | null
The agent the node was archived from.
string | null
The agent’s name at archive time.
string
Taken from
node.data.name, or Untitled node when absent.string
The value of
node.type.string | null
The first 160 characters of
node.data.rule, or of node.data.prompt when there is no rule. null when the node has neither.object
The node payload as submitted.
string
ISO 8601 timestamp of when the node was archived.
null | array
null on success, or a list of error objects if the request failed.{
"data": {
"id": "ae798cb1-375c-425e-978f-cb2c0ccd5e29",
"agent_id": "faa42069-ed8e-4c07-bdf3-3bee134aa033",
"agent_name": "Front desk",
"name": "Holiday hours",
"kind": "scenario",
"description": "Tell the caller the office is closed for the holiday and offer to take a message.",
"node": {
"id": "db7272f8-7c8e-43f5-a442-a30883026bab",
"type": "scenario",
"position": { "x": 380, "y": 260 },
"data": {
"name": "Holiday hours",
"rule": "Tell the caller the office is closed for the holiday and offer to take a message.",
"target": { "kind": "dialogue", "label": "Holiday hours" },
"loopWhile": "",
"variables": [
{
"id": "f0bf6e1f-cffa-41bc-a615-31d426c7eb89",
"key": "callback_number",
"value": "The phone number the caller wants to be reached at",
"type": "string",
"accurateSpelling": true
}
],
"entry": {
"mode": "llm",
"label": "Asks about hours",
"description": "",
"alwaysPick": false,
"conditions": []
}
}
},
"created_at": "2026-09-10T18:21:07.442Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "INVALID_NODE",
"message": "node.type must be a non-empty string"
},
{
"error": "INVALID_NODE",
"message": "node.position must be { x: number, y: number }"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?