> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# List folders

GET https://{tenant_name}.benchling.com/api/v2/folders

List folders

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/folders/list-folders

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `nextToken` (string, optional)
- `pageSize` (integer, optional, default: 50)
- `sort` (enum, optional, default: name) — Method by which to order search results. Valid sorts are modifiedAt (modified time, most recent first) and name (folder name, alphabetical). Optionally add :asc or :desc to specify ascending or descending order.
  - Allowed values: `createdAt`, `createdAt:asc`, `createdAt:desc`, `modifiedAt`, `name`, `modifiedAt:asc`, `name:asc`, `modifiedAt:desc`, `name:desc`
- `archiveReason` (string, optional) — Archive reason. Restricts items to those with the specified archive reason. Use "NOT_ARCHIVED" to filter for unarchived folders. Use "ANY_ARCHIVED" to filter for archived folders regardless of reason. Use "ANY_ARCHIVED_OR_NOT_ARCHIVED" to return items for both archived and unarchived.
- `nameIncludes` (string, optional) — Name substring of a folder. Restricts results to those with names that include the provided substring.
- `parentFolderId` (string, optional) — ID of a folder. Restricts results to those in the folder. Use "NO_PARENT" to filter for root folders.
- `projectId` (string, optional) — ID of a project. Restricts results to those in the project.
- `ids` (string, optional) — Comma-separated list of ids. Matches all of the provided IDs, or returns a 400 error that includes a list of which IDs are invalid.
- `name` (string, optional) — Name of a folder. Restricts results to those with the specified name.
- `section` (enum, optional, deprecated) — Deprecated - Folder types have been merged, however this will restrict to the pre-merge types.
  - Allowed values: `INVENTORY`, `NOTEBOOK`

## Response

### 200

OK

- `folders` (list of Folder, optional)
- `nextToken` (string, optional)

## Types

### Folder

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `id` (string, optional)
- `name` (string, optional)
- `parentFolderId` (string, optional, nullable) — ID of the parent folder, if it exists
- `projectId` (string, optional) — ID of the containing project

### ArchiveRecord

- `reason` (string, optional)

## Examples

**Response**

```json
{
  "folders": [
    {
      "archiveRecord": {
        "reason": "Made in error"
      },
      "id": "string",
      "name": "string",
      "parentFolderId": "string",
      "projectId": "string"
    }
  ],
  "nextToken": "string"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/folders"

querystring = {"archiveReason":"NOT_ARCHIVED"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/folders?archiveReason=NOT_ARCHIVED';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```