Blocks
post/blocks

Request

  • Base URL
    https://api.deepnote.com/v2
  • URL
    https://api.deepnote.com/v2/blocks
  • Auth
    HTTP bearer

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

Changes

    • breaking

      the response property / became nullable for the status

    • info

      response property block/contentHash list-of-types was narrowed by removing types null from media type application/json of response 201

    • info

      the / response's property pattern was changed from ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ to ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ for the status

    • info

      the / response's property pattern was changed from ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ to ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ for the status

    • info

      added the required property / to the response with the status