> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bland.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive Agent Node

> Copy a node from an agent into the organization archive.

### 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](https://docs.bland.ai/api-v2/post/agents-id-versions.md). Browse the archive with [List Archived Nodes](https://docs.bland.ai/api-v2/get/agents-library-archived-nodes.md).

Requires an admin, owner, operator, or prompter role.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

**agent\_id** `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

**node** `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

Returns `201` on success.

**data** `object`

The new archive entry.

**archived node object**

**id** `string`

Unique identifier for the archive entry. Use it with [Delete Archived Node](https://docs.bland.ai/api-v2/delete/agents-library-archived-nodes-archived-node-id.md).

**agent\_id** `string | null`

The agent the node was archived from.

**agent\_name** `string | null`

The agent's name at archive time.

**name** `string`

Taken from `node.data.name`, or `Untitled node` when absent.

**kind** `string`

The value of `node.type`.

**description** `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.

**node** `object`

The node payload as submitted.

**created\_at** `string`

ISO 8601 timestamp of when the node was archived.

**errors** `null | array`

`null` on success, or a list of error objects if the request failed.

```json Response theme={null}
{
  "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
}
```

```json Invalid Node theme={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 }"
    }
  ]
}
```

```json Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "NOT_FOUND",
      "message": "Agent not found"
    }
  ]
}
```

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.