---
title: "Rename a folder"
method: PATCH
path: "/api/v1/folders/{id}"
tags: ["workspace"]
---

# Rename a folder

`PATCH /api/v1/folders/{id}`

## Request

- Base URL: `https://mdtidy.com`
- URL: `https://mdtidy.com/api/v1/folders/{id}`
- Auth: HTTP bearer

## Request body

- UpdateFolderRequest
  - `name` string, required

## Response `200`

Updated folder.

- Folder
  - `id` string, uuid, required
  - `type` 'folder', required
  - `project_id` string, uuid, required
  - `parent_id` string, uuid, required: Immediate parent: the project id (root folder) or another folder id.
  - `name` string, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `401`: X-API-KEY is malformed, unknown, or revoked.
- `404`: Resource not found, or not owned by the caller (IDOR-safe).
- `409`: Name collision, stale write, or a resource limit was reached.
- `422`: Request body failed validation.
- `429`: Per-key rate limit (60/min) exceeded.

---

[API](https://skmtc.dev/mdtidy/apis/markdown-tidy-api.md) · [All operations](https://skmtc.dev/mdtidy/apis/markdown-tidy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mdtidy/apis/markdown-tidy-api/revisions/caeec6fad155?raw)
