---
title: "Patch a folder"
method: PATCH
path: "/matters/{matterId}/documents/folders/{folderId}"
tags: ["Folders"]
---

# Patch a folder

`PATCH /matters/{matterId}/documents/folders/{folderId}`

Partially updates a folder belonging to the specified matter. Only the fields supplied in the request are applied.
            
A deleted folder can be restored by setting `isDeleted` to `false`. Only the folder itself is restored;
subfolders and files that were deleted remain deleted. Other fields supplied in the same request are applied after the restore.

## Path parameters

- `matterId` string, required
- `folderId` string, required

## Request body

- PatchFolderDto — Partial update of a folder. Only the fields supplied in the request are applied. Accepted as an `application/json` merge-style object or as an `application/json-patch+json` document with paths `/name`, `/parentFolderId`, `/userId` and `/isDeleted`.
  - `name` string, nullable — Name of the folder. If omitted the current name is kept. Must not be empty or whitespace when supplied.
  - `parentFolderId` string, nullable — Unique identifier of the parent folder. Must be a valid GUID when supplied. If omitted the folder is not moved. Set to null to move the folder to the matter root. The destination must belong to the same matter; it is not validated for existence.
  - `userId` string, nullable — Unique identifier of the user modifying the folder. Must be a valid GUID when supplied. If null it will fallback to the authenticated user.
  - `isDeleted` boolean, nullable — A deleted folder can be restored by setting this to false. Only the folder itself is restored; previously deleted subfolders and files remain deleted. Setting this to true is not supported, use DELETE instead.

## Response `202`

When request is accepted. Returns a hypermedia 'Link' object of the folder to be updated.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400` — When a supplied id is not a valid GUID, no fields are supplied, folder name is empty, `isDeleted` is set to true, the folder is deleted and is not being restored, the folder does not belong to the specified matter, or the destination folder belongs to another matter.
- `404` — When folder with the specified id does not exist.

---

[API](https://skmtc.dev/smokeball/apis/api.md) · [All operations](https://skmtc.dev/smokeball/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smokeball/api/revisions/db1b8a86b58e/schema)
