---
title: "Rename or move a folder"
description: "Renames a folder, changes its address, moves it (parent_id; null is the top level) or sets the access new documents in it start with."
canonical_url: https://docs.markdrop.in/api/folders/rename-or-move-a-folder
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Rename or move a folder

`PATCH https://api.markdrop.in/api/v1/workspaces/{workspace_id}/folders/{folder_id}`

Renames a folder, changes its address, moves it (`parent_id`; `null` is the top level) or sets the access new documents in it start with. Admins and the owner. Every document below it moves to its new address.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per minute per IP address.

## Path parameters

- `workspace_id` (string, required): The workspace's id, from the address of its settings page (`markdrop.in/settings/workspaces/<workspace-id>`) or from [List workspaces](https://docs.markdrop.in/api/workspaces/list-workspaces).
- `folder_id` (string, required): The folder's id, from [List folders](https://docs.markdrop.in/api/folders/list-folders).

## Request body

`application/json`, required.

- `name` (string): 1–80 characters.
- `slug` (string): 1–40 characters.
- `parent_id` (string)
- `default_access` ("link" | "private" | "workspace")

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X PATCH https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/folders/FOLDER_ID \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Handbook"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/folders/FOLDER_ID", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Handbook"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.patch(
    "https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/folders/FOLDER_ID",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"name": "Handbook"},
)
r.raise_for_status()
print(r.json())
```
