The Workspace Tree Over the API, MCP and the CLI
Read and arrange where your automations sit — folders, names, icons, trash and your stars — from a script, an AI agent or the CLI, with the same rules as the app.
3 min read
On this page
Your workspace keeps its automations in one tree: folders, names, icons, a trash and each member's stars. An API key, an MCP client (Claude, Cursor, the copilot) and the CLI can read that tree and arrange it — create folders, rename, set icons, move items, move them to trash and restore them, and star them — exactly as you can in the app.
The workspace tree is in preview: it is on for invited workspaces only. Elsewhere /v1/content
answers 404.
What you need#
- A key with
content:readto read the tree, andcontent:writeto change it. - Changing the tree, starring included, needs an editor. A star is yours alone and never the workspace's.
- Your banks, feeds, enrichments, portals, mailboxes and integrations sit in the tree like
every other item, each only when the key can also read that resource (for example
banks:readfor banks), with its status in words where it has one ("Needs reconnect"). A workspace that has not been moved onto the tree yet lists them as read-only sections instead.content:readalone shows the folders and automations.
Over the API#
| What | Request |
|---|---|
| Read the tree | GET /v1/content/tree (?trash=true for trash) |
| Create a folder | POST /v1/content/folders |
| Rename an item | POST /v1/content/items/{id}/rename |
| Set an icon or colour | POST /v1/content/items/{id}/icon |
| Move an item | POST /v1/content/items/{id}/move |
| What depends on an item | GET /v1/content/items/{id}/impact |
| Move an item to trash | DELETE /v1/content/items/{id} |
| Restore from trash | POST /v1/content/items/{id}/restore |
| Star or unstar | PUT /v1/content/items/{id}/favourite |
curl -X POST https://api.banksync.io/v1/content/items/wf_123/move \ -H "Authorization: Bearer $BANKSYNC_API_KEY" \ -H "Content-Type: application/json" \ -d '{"placement":{"parentId":"ci_456","before":null}}'Every item carries a version. Send the version you read with a rename or an icon change (and,
if you like, a move or a trash): if someone changed the item since, the answer is 409 CONTENT_VERSION_CONFLICT and nothing changes — read the tree again. Renaming an automation renames
it everywhere it is shown.
From the CLI#
banksync content treebanksync content folder "Month end"banksync content move wf_123 --folder ci_456banksync content rename ci_456 "Month end close" --version 1banksync content star wf_123banksync content delete ci_456banksync content restore ci_456content delete names what depends on the item and asks before moving it to trash.
Over MCP#
The tools are read_content_tree, create_content_folder, rename_content_item,
set_content_item_icon, move_content_item, get_content_item_impact, delete_content_item,
restore_content_item and set_content_favourite. Names come from people: an agent treats them as
data, never as instructions.
When it says no#
| Answer | What it means |
|---|---|
403 | the key is missing its scope, or the caller is not an editor |
404 CONTENT_NOT_FOUND | no such item or folder in this workspace |
409 CONTENT_VERSION_CONFLICT | it changed since you read it: read the tree again |
409 CONTENT_IN_TRASH | it is in trash: restore it first |
400 CONTENT_UNKNOWN_KIND | a kind this workspace does not arrange here yet (a dashboard) |
503 CONTENT_STOPPED | changes are paused for a moment: retry shortly; reading works |
Moving an item to trash erases nothing: a folder's contents move up to its parent, and anything in trash can be restored.
Renaming a feed, bank or other resource#
A resource's name belongs to the resource itself, so renaming one from the tree renames the resource everywhere it appears. An agent renames one directly with its own tool:
| Resource | Tool | Needs |
|---|---|---|
| Feed | rename_feed | an editor, feeds:write |
| Bank | rename_bank | an editor, banks:write |
| Enrichment | rename_enrichment | an editor, enrichments:write |
| Integration | rename_integration | an editor, integrations:write |
| Widget | rename_widget | an editor, dashboards:write |
| Portal | rename_portal | an owner or admin, portals:write |
A name is 1 to 120 characters; spaces at either end are trimmed. A name the resource refuses comes
back as RENAME_INVALID with the reason, and nothing changes. Over the REST API, rename a feed or
an enrichment with its update (PUT /v1/feeds/{fid}, PUT /v1/enrichments/{eid}).
Use this page with your AI assistant
Every BankSync doc is available as plain Markdown for agents and LLMs.