---
title: "List all folders under an account in hierarchical structure"
method: GET
path: "/folders/tree"
tags: ["Organizing locations"]
---

# List all folders under an account in hierarchical structure

`GET /folders/tree`

## Request

- Base URL: `https://api.synup.com/api/v4`
- URL: `https://api.synup.com/api/v4/folders/tree`
- Auth: none required
- TypeScript: <https://skmtc.dev/synup/apis/synup-api/docs/folders/tree/get.ts> (a function with typed inputs; its response is checked against the schema)

This API retrieves a complete hierarchical tree of all active folders within an account.

Response Includes:
- Folder hierarchy levels (parent and nested subfolders)
- Location count within each folder
- Nested subfolder details for a structured view

## Headers

- `Authorization` string

## Response `200`

Successfully retrieved folder tree structure

- object
  - `data` object
    - `getFolderTree` FolderNodeV2[]
      - `id` string, uuid, required: Unique identifier for the folder
      - `name` string, required: Name of the folder
      - `level` integer, required: Hierarchical level of the folder (0 being root)
      - `locationCount` integer, required: Number of locations contained within this folder
      - `subFolders` FolderNodeV2[], required: List of child folders under this folder

---

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