---
title: "Update a Team folder"
method: PATCH
path: "/api/team/v1/folders/{id}"
tags: ["Team folders"]
---

# Update a Team folder

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

## Request

- Base URL: `https://mdflow.cz`
- URL: `https://mdflow.cz/api/team/v1/folders/{id}`
- Auth: HTTP bearer

Renames, re-describes, or moves a Team folder. Provide at least one of name, description, or parent_id. Renaming or moving disambiguates the name against the destination siblings. `parent_id` null moves the folder to the workspace top level; a parent in another workspace returns 404, and making a folder its own parent or a descendant's child is rejected with 400. Folders never move across workspaces. Requires write access to the folder's workspace.

## Path parameters

- `id` string, uuid, required

## Request body

- PatchTeamFolderInput: At least one of name, description, or parent_id must be provided.
  - `name` string
  - `description` string, nullable: Empty text or null clears the description; an absent key leaves it untouched.
  - `parent_id` string, uuid, nullable: Destination parent in the same workspace, or null for the workspace top level.

## Response `200`

Updated Team folder.

- TeamFolder
  - `id` string, uuid, required
  - `workspace_id` string, uuid, required: The Team workspace this folder belongs to. Never changes.
  - `parent_id` string, uuid, nullable, required: Parent folder, or null for a top-level folder.
  - `name` string, required
  - `description` string, nullable, required: The primary retrieval signal for the documents inside.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Request body was malformed, empty, or failed validation, or the move would create a cycle.
- `401`: Missing, malformed, invalid, or revoked Team access token — including a personal `mdf_` token sent to a Team route, and a token whose creator has left the team. The body includes a `message` with Team token guidance, and the response carries a `WWW-Authenticate` challenge.
- `403`: The Team access token is valid but the operation exceeds its effective access: a write from a read-only token or from a creator whose current workspace permission is read-only, a write while the Team account is not active (setup, grace, or read_only), or any request while the account is being deleted. No plan check is involved — eligibility comes from the Team seat. The body includes a `message` with guidance.
- `404`: The folder, or the destination parent folder, is not in a workspace the token can read.
- `429`: The token or authenticated user exceeded a 60 requests per minute rate limit.
- `500`: Unexpected server error, or the live membership lookup failed. Retry rather than discarding the token — this is never a revocation signal.

---

[API](https://skmtc.dev/mdflow/apis/mdflow-public-api.md) · [All operations](https://skmtc.dev/mdflow/apis/mdflow-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mdflow/apis/mdflow-public-api/revisions/3691fc5d1688?raw)
