Archive file or folder
archive_node
| Through | Form |
|---|---|
| HTTP | POST https://api.markdownbrain.ai/v1/nodes/archive |
| MCP | tool archive_node |
| CLI | mdbrain call archive_node |
Archive a file or folder: put it away without throwing it away. It leaves list_files — a folder takes everything inside it — and stays exactly where it is, readable by read_file and listed by list_archived. Nothing about its path changes, so a document that links to it still works. Use it to keep a workspace's listing short; use delete_node when something should actually go. The brain's root brain-config.yaml cannot be archived; delete it to turn it off. Name it with path or with node_id — exactly one of the two.
Who may call it: agents and people.
Writes: yes.
Arguments
| Name | Type | Required | Travels in | Description |
|---|---|---|---|---|
workspace_id | string | no | JSON body | Only needed to disambiguate a path, or alongside node_id |
node_id | string | no | JSON body | file_node id — or use path |
path | string | no | JSON body | Workspace-relative path of the node to archive |
Success
200 with application/json.
Example request
curl -X POST https://api.markdownbrain.ai/v1/nodes/archive \
-H "Authorization: Bearer $MDBRAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"path":"specs/07-old-pricing.md","workspace_id":"00000000-0000-4000-8000-000000000010"}'
mdbrain call archive_node \
--path specs/07-old-pricing.md \
--workspace-id 00000000-0000-4000-8000-000000000010
Example response
Written from the code rather than captured from a call.
{
"node_id": "00000000-0000-4000-8000-000000000107",
"path": "specs/07-old-pricing.md",
"archived_at": "2026-02-20T11:00:00.000Z"
}
Refusals
A refusal is a status code with { error: { code, message } }. See Errors.