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

# Update a folder

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

Replaces the editable fields of a folder belonging to the specified matter. All fields are applied, not only the ones
that changed: `name` is required, and omitting `parentFolderId` (or setting it to null) moves the folder to the matter root.
Use PATCH to change individual fields.
            
The destination folder must be on the same matter (400 otherwise); a destination that does not exist is not rejected.
If `userId` is omitted the authenticated user is recorded. A deleted folder cannot be updated with PUT; use PATCH with `isDeleted: false` to restore it.

## Path parameters

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

## Request body

- FolderDto
  - `name` string, required — Name of the folder. Required; must not be empty or whitespace. Maximum 256 characters.
  - `parentFolderId` string, nullable — Unique identifier of the parent folder. Must be a valid GUID when supplied. Null or omitted means the matter root: on create the folder is created under the root, on PUT the folder is moved to the root. The parent folder 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.

## 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, folder name is not provided or exceeds 256 characters, 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)
