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

# Patch a folder

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

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/matters/{matterId}/documents/folders/{folderId}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

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.

## Changes

- **2026-08-26** `db1b8a86b58e`: 12 info
  - added the new optional request property `isDeleted` (media type: application/json-patch+json)
  - added the new optional request property `isDeleted` (media type: application/json)
  - added the new optional request property `isDeleted` (media type: application/*+json)
  - the request property `name` became nullable (media type: application/json-patch+json)
  - …8 more

[Operation history](https://skmtc.dev/smokeball/apis/smokeball-api/changes/matters/:matterId/documents/folders/:folderId/patch.md)

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
