API referenceTutorialsmarkdownbrain.ai

Archive file or folder

archive_node

ThroughForm
HTTPPOST https://api.markdownbrain.ai/v1/nodes/archive
MCPtool archive_node
CLImdbrain 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

NameTypeRequiredTravels inDescription
workspace_idstringnoJSON bodyOnly needed to disambiguate a path, or alongside node_id
node_idstringnoJSON bodyfile_node id — or use path
pathstringnoJSON bodyWorkspace-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.