---
title: "Create a folder"
method: POST
path: "/api/notebooks/{notebook}/folders"
tags: ["notebook-controller"]
---

# Create a folder

`POST /api/notebooks/{notebook}/folders`

Creates a folder at notebook root when no parent is specified; as a child of underFolderId when set; otherwise nested under the context note's folder when underNoteId is set (underFolderId takes precedence when both are set).

## Path parameters

- `notebook` integer, required

## Request body

- FolderCreationRequest — Create a folder under notebook root, nested under an explicit parent folder, or nested under the folder of a context note.
  - `name` string, required — Display name for the new folder
  - `underFolderId` integer — When set, the new folder is created as a direct child of this folder. Must belong to the target notebook. Takes precedence over underNoteId when both are set.
  - `underNoteId` integer — When set (and underFolderId is not), the new folder is a child of this note's folder (or notebook root when the note has no folder). Must belong to the target notebook.

## Response `200`

OK

## Changes

- **2026-08-19** `6c31eea0ac37` — 1 warning
  - changed the pattern of the request property `name` from `^[^\\/:]*$` to `^[\s\x00-\x1F]*[^\\/:*?"<>|\x00-\x1F]*[\s\x00-\x1F]*$`
- **2026-07-22** `13f77438750e` — 1 warning, 1 info
  - removed the optional property `indexContent` from the response with the `200` status
  - added the optional property `readmeContent` to the response with the `200` status
- **2026-05-12** `de5624b4a98c` — 1 info
  - added the optional property `indexContent` to the response with the `200` status
- **2026-05-11** `d7c2946139e9` — 1 warning
  - removed the optional property `indexContent` from the response with the `200` status

[Change history](https://skmtc.dev/nerds-odd-e/apis/openapi-definition/changes/api/notebooks/:notebook/folders/post.md)

---

[API](https://skmtc.dev/nerds-odd-e/apis/openapi-definition.md) · [All operations](https://skmtc.dev/nerds-odd-e/apis/openapi-definition/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nerds-odd-e/openapi-definition/revisions/44ef688a3dcd/schema)
