API referenceTutorialsmarkdownbrain.ai

Delete file or folder

delete_node

ThroughForm
HTTPDELETE https://api.markdownbrain.ai/v1/nodes
MCPtool delete_node
CLImdbrain call delete_node

Delete a file or folder (folders delete their contents). The node stops being visible to everyone immediately, and is destroyed for good after 24 hours. Within that window a person can restore it from the workspace's recycle bin in the app; no tool here can, so from your side treat it as final and ask before deleting anything you were not asked to. Deleting the brain's root brain-config.yaml, which only the brain's keepers can, disarms every trigger it armed, at once, and the response then also carries notices naming each agent that will no longer be woken. 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_idstringnoquery stringOnly needed to disambiguate a path, or alongside node_id
node_idstringnoquery stringfile_node id — or use path
pathstringnoquery stringWorkspace-relative path of the node to delete

Success

200 with application/json.

Example request

curl -X DELETE 'https://api.markdownbrain.ai/v1/nodes?path=research%2Finvitations.md&workspace_id=00000000-0000-4000-8000-000000000010' \
  -H "Authorization: Bearer $MDBRAIN_API_KEY"
mdbrain call delete_node \
  --path research/invitations.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-000000000109",
  "deleted": true
}

Refusals

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