---
title: "Get the folder tree"
method: GET
path: "/v1/workspaces/{workspace_id}/folders/tree"
tags: ["Folders"]
---

# Get the folder tree

`GET /v1/workspaces/{workspace_id}/folders/tree`

## Request

- Base URL: `https://api.stacksync.com`
- URL: `https://api.stacksync.com/v1/workspaces/{workspace_id}/folders/tree`
- Auth: HTTP bearer

Every folder of the workspace in one region, nested under its parent, as the web app's sidebar shows it.

## Path parameters

- `workspace_id` integer, required

## Query parameters

- `region` 'besg' | 'usnv', required

## Response `200`

OK

- FolderTree: Every folder of the workspace in one region, nested under its parent
  - `region` 'besg' | 'usnv', required
  - `folders` FolderTreeNode[], required: The folders at the root, each with its sub-folders
    - `folder_id` string, required
    - `folder_name` string, required
    - `folders` FolderTreeNode[], required

## Other responses

- `400`: Bad Request
- `403`: Forbidden

---

[API](https://skmtc.dev/stacksync/apis/stacksync-api.md) - [All operations](https://skmtc.dev/stacksync/apis/stacksync-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stacksync/apis/stacksync-api/revisions/21f4ba4b214e?raw)
