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

# Folders

> Organize files with folders

Folders allow you to organize files into a hierarchical structure.

## List Folders

Retrieve all folders.

```bash theme={null}
GET /folders
```

**Example:**

```bash theme={null}
curl "https://your-directus-instance.com/folders" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Get Folder

Retrieve a single folder.

```bash theme={null}
GET /folders/:id
```

## Create Folder

Create a new folder.

```bash theme={null}
POST /folders
```

**Request Body:**

```json theme={null}
{
  "name": "Images",
  "parent": null
}
```

**Example:**

```bash theme={null}
curl -X POST "https://your-directus-instance.com/folders" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Documents"
  }'
```

## Create Nested Folder

Create a folder inside another folder:

```json theme={null}
{
  "name": "Photos",
  "parent": "abc-123-def"
}
```

## Update Folder

Update folder metadata.

```bash theme={null}
PATCH /folders/:id
```

**Request Body:**

```json theme={null}
{
  "name": "Updated Name"
}
```

## Delete Folder

Delete a folder.

```bash theme={null}
DELETE /folders/:id
```

<Warning>
  Deleting a folder also deletes all files within it. This action cannot be undone.
</Warning>

## Folder Properties

<ResponseField name="id" type="string">
  Unique folder identifier (UUID)
</ResponseField>

<ResponseField name="name" type="string">
  Folder name
</ResponseField>

<ResponseField name="parent" type="string">
  Parent folder ID (null for root)
</ResponseField>

## Next Steps

<CardGroup cols={2}>
  <Card title="Files" icon="file" href="/api/rest/files">
    Manage files
  </Card>

  <Card title="File Storage" icon="hard-drive" href="/features/file-storage">
    Configure storage
  </Card>
</CardGroup>
