> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Folders

> Retrieve all gallery folders for the current workspace.

## Method

`GET` `/v1/gallery/folders`

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.voyantcloud.com/v1/gallery/folders" \
    -H "Authorization: Bearer $VOYANT_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.voyantcloud.com/v1/gallery/folders", {
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
  })
  const { data } = await response.json()
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
    "https://api.voyantcloud.com/v1/gallery/folders",
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  data = resp.json()["data"]
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "id": "11111111-1111-1111-1111-111111111111",
        "workspaceId": "ws_abc",
        "name": "Marketing",
        "parentId": null,
        "path": "Marketing",
        "createdAt": "2025-01-05T12:00:00.000Z",
        "updatedAt": "2025-01-05T12:00:00.000Z"
      },
      {
        "id": "22222222-2222-2222-2222-222222222222",
        "workspaceId": "ws_abc",
        "name": "Campaigns",
        "parentId": "11111111-1111-1111-1111-111111111111",
        "path": "Marketing/Campaigns",
        "createdAt": "2025-02-01T08:00:00.000Z",
        "updatedAt": "2025-02-01T08:00:00.000Z"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>Folders are returned flat. Use `parentId` and `path` to build a tree structure on the client.</Tip>
