---
title: "Create a folder"
method: POST
path: "/matters/{matterId}/documents/folders"
tags: ["Folders"]
---

# Create a folder

`POST /matters/{matterId}/documents/folders`

Creates a new folder under the specified matter.
            
When `parentFolderId` is null or omitted the folder is created under the matter root.

## Path parameters

- `matterId` 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 created.

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

## Other responses

- `400` — When folder name is not provided or is whitespace, exceeds 256 characters, or a supplied id (`matterId`, `parentFolderId`, `userId`) is not a valid GUID.

---

[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)
