latestOpenAPI 3.1.02026-08-204489152.5 KB

726970fd2992

Blocks

Create a block

post/blocks

Request body

notebookIdstring required

Notebook to create the block in.

type'code' | 'sql' | 'markdown' | 'notebook-function' | 'input-text' | 'input-textarea' | 'input-select' | 'input-date' | 'input-date-range' | 'input-slider' | 'input-file' | 'input-checkbox' | 'text-cell-h1' | 'text-cell-h2' | 'text-cell-h3' | 'text-cell-p' | 'text-cell-bullet' | 'text-cell-todo' | 'text-cell-callout' | 'visualization' | 'pivot-table' | 'image' | 'button' | 'separator' | 'big-number' | 'agent' required

Block type (e.g. "code", "sql", "markdown").

contentstring

Initial block content. Defaults to an empty string.

metadataobject

Block-type-specific metadata.

integrationIdstring uuid

Integration ID to store in SQL block metadata as sql_integration_id.

positioninteger

Zero-based insertion index. Omit to append at the end.

includeNotebookBlockIdsboolean

When true, response includes all block IDs in the notebook.

Response

Block created

notebookBlockIdsstring[]

All block IDs in the notebook (only when includeNotebookBlockIds is true).