v4

latestOpenAPI 3.1.02026-08-08349225311.7 KB
runtime_mutations
notebook

Create File Route

Create a new notebook or text file, failing if the path already exists.

Unlike /notebook/save (an upsert), this endpoint refuses to overwrite an existing file and returns 409 Conflict when path is taken.

For .ipynb files this writes a starter notebook containing one empty code cell whose cell_id is minted on the backend. That avoids the frontend (useNotebookLoader.makeEmptyCell) fabricating a phantom cell with a client-side id when it loads a zero-cell notebook.

post/notebook/create

Request body

pathstring required
contentstring nullable
metadataobject

Response

Successful Response

{"stackTrail":"paths:/notebook/create:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}