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

# List folders

> List the subfolders of a folder with the Node.js SDK.

`client.folders().listFolders()` lists the subfolders of a [folder](https://infisical.com/docs/documentation/platform/folder.md) in an environment of a project.

## Parameters

**options** `ListFoldersOptions` *required*

**properties**

**projectId** `string` *required*

The ID of the project.

**environment** `string` *required*

The slug of the environment, such as `dev`.

**path** `string` (default: /)

The path of the folder whose subfolders to list.

**recursive** `boolean` (default: false)

Whether to also list the subfolders of every subfolder.

## Returns

**folders** `Folder[]`

The folders, each with its `id`, `name`, and `description`.

```typescript Basic theme={"dark"}
const folders = await client.folders().listFolders({
  projectId: "<project-id>",
  environment: "dev",
});
```

```typescript Recursive theme={"dark"}
const folders = await client.folders().listFolders({
  projectId: "<project-id>",
  environment: "dev",
  path: "/backend",
  recursive: true,
});
```

```json Response theme={"dark"}
[
  {
    "id": "3a1f6c2e-9b4d-4e7a-8c5f-2d1e0b9a8c7f",
    "name": "backend",
    "description": "Secrets for the backend service",
    "envId": "c4e2a1b9-7d3f-4a6e-9b8c-5f0e1d2c3b4a",
    "parentId": "8b7a6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
    "version": 1,
    "createdAt": "2026-11-02T09:10:05.220Z",
    "updatedAt": "2026-11-02T09:10:05.220Z"
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.