GETapi.synup.com/api/v4/folders/tree
List all folders under an account in hierarchical structure
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
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Request
Request
curl -X GET 'https://api.synup.com/api/v4/folders/tree' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/folders/tree', {
method: 'GET',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await res.json();import requests
res = requests.get(
"https://api.synup.com/api/v4/folders/tree",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/folders/tree", nil)
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successfully retrieved folder tree structure |
Example response (generated from the schema)
{
"data": {
"getFolderTree": [
{
"id": "67049f29-3bc6-4e82-875b-02159b4b1fea",
"name": "root",
"level": 0,
"locationCount": 25,
"subFolders": [
null
]
}
]
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.getFolderTree | array of object | optional | |
data.getFolderTree[].id | string | required | Unique identifier for the folder |
data.getFolderTree[].name | string | required | Name of the folder |
data.getFolderTree[].level | integer | required | Hierarchical level of the folder (0 being root) |
data.getFolderTree[].locationCount | integer | required | Number of locations contained within this folder |
data.getFolderTree[].subFolders | array of object | required | List of child folders under this folder |