API referenceTutorialsmarkdownbrain.ai

Unarchive file or folder

unarchive_node

ThroughForm
HTTPPOST https://api.markdownbrain.ai/v1/nodes/unarchive
MCPtool unarchive_node
CLImdbrain call unarchive_node

Bring an archived file or folder back into the ordinary listing. It clears the stamp on that one node: anything inside it that was archived on its own account stays away, and the node itself stays away if it sits inside a folder that is still archived — still_archived_by_an_ancestor says which, and is null where the tree could not be read, meaning the stamp was cleared and nothing checked. 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 unarchive

Success

200 with application/json.

Example request

curl -X POST https://api.markdownbrain.ai/v1/nodes/unarchive \
  -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 unarchive_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": null,
  "still_archived_by_an_ancestor": false
}

Refusals

A refusal is a status code with { error: { code, message } }. See Errors.