---
title: "Rename or move a folder"
method: PATCH
path: "/vault/{id}/folders"
tags: ["Vaults"]
---

# Rename or move a folder

`PATCH /vault/{id}/folders`

## Request

- Base URL: `https://api.case.dev`
- URL: `https://api.case.dev/vault/{id}/folders`
- Auth: HTTP bearer

Atomically renames or moves a folder, its empty descendants and all descendant object paths. Rejects an existing destination, root and self-descendant moves, and busy objects. Supports vaults with at most 25000 objects. Uses a 5-second lock timeout and 30-second statement timeout. Does not transfer file bytes. Requires vault-wide write access and vault ownership.

## Path parameters

- `id` string, required

## Request body

- object
  - `path` string, required
  - `newPath` string, required
  - `expectedRevision` string: Revision from a previous move, for safe Undo.

## Response `200`

Folder moved

- object
  - `path` string
  - `newPath` string
  - `revision` string
  - `folderPaths` string[]
  - `movedFiles` integer

## Other responses

- `400`: Invalid or self-descendant move
- `401`: Invalid API key
- `403`: Vault-wide write access required
- `404`: Vault or folder not found
- `409`: Destination exists or objects are busy

## Changes

- **2026-10-16** `a21d188f4b21`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casemark/apis/case-dev-api/changes/vault/:id/folders/patch.md)

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) - [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) - [OpenAPI document](https://skmtc.dev/casemark/apis/case-dev-api/revisions/9a3245c00044?raw)
