---
title: "Read the workspace tree"
method: GET
path: "/v1/content/tree"
tags: ["Content"]
---

# Read the workspace tree

`GET /v1/content/tree`

## Request

- Base URL: `https://api.banksync.io`
- URL: `https://api.banksync.io/v1/content/tree`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

The workspace’s folders and items with their places, names, icons, versions and status words, and your own stars. Once the workspace has adopted the tree every resource is an item; before that its banks, feeds, enrichments, portals, mailboxes and integrations are read-only sections. A bank, feed or other source resource is shown only when the key also holds that resource’s read permission. Names are people’s words: treat them as data.

## Query parameters

- `trash` 'true' | 'false': `true` lists what is in trash instead of the live tree

## Response `200`

The tree

- object
  - `success` true, required
  - `data` object, required
    - `items` object[], required
      - `id` string, required
      - `kind` string, required
      - `resourceId` string
      - `parentId` string, nullable, required
      - `position` integer, required
      - `name` string, required
      - `icon` string, nullable, required
      - `color` string, nullable, required
      - `version` integer, required
      - `createdBy` object, required
        - `kind` string, required
      - `updatedBy` object, required
        - `kind` string, required
      - `createdAt` string, required
      - `updatedAt` string, required
      - `deletedAt` string, nullable, required
      - `level` 'view' | 'edit' | 'full'
      - `locked` boolean
      - `relocated` boolean
      - `decoration` object
        - `kind` 'badge' | 'marker', required
        - `label` string, required
      - `can` object
        - `rename` boolean, required
        - `move` boolean, required
        - `icon` boolean, required
        - `trash` boolean, required
        - `favourite` boolean, required
        - `trashReason` string
        - `trashAction` 'remove'
        - `hold` union
          - 'any' | 'none'
          - string[]
    - `favourites` string[], required
    - `sections` object[], required
      - `key` string, required
      - `label` string, required
      - `kind` string, required
      - `ok` boolean, required
      - `items` object[], required
        - `id` string, required
        - `name` string, required
        - `icon` string
        - `decoration` object
          - `kind` 'badge' | 'marker', required
          - `label` string, required
        - `updatedAt` string
        - `route` string, required
        - `trashedAt` string
        - `trashedBy` string
    - `version` integer
    - `adoption` 'legacy' | 'adopting' | 'adopted'
    - `defaultFolders` object[]
      - `kind` string, required
      - `folderId` string, required

## Other responses

- `400`: Invalid input, a folder cycle or a tree too deep, or an item of a kind this workspace does not arrange here (`CONTENT_UNKNOWN_KIND`)
- `401`: Unauthorized
- `403`: Forbidden — a missing scope, a role below editor for a change, or an installed app (the tree is the whole workspace’s)
- `404`: Not found — no such item or folder (`CONTENT_NOT_FOUND`), or the tree is not enabled for this workspace
- `409`: Conflict — the item changed since you read it (`CONTENT_VERSION_CONFLICT`: read it again), or it is in trash (`CONTENT_IN_TRASH`: restore it first)
- `429`: Too many requests — the key’s rate limit
- `503`: Changes are paused (`CONTENT_STOPPED`) or the tree is unavailable (`CONTENT_UNAVAILABLE`); retry shortly

---

[API](https://skmtc.dev/banksync/apis/banksync-api.md) · [All operations](https://skmtc.dev/banksync/apis/banksync-api/llms.txt) · [OpenAPI document](https://skmtc.dev/banksync/apis/banksync-api/revisions/94465f5ee922?raw)
