Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Interact with the Notion REST API to read, create, update, and delete pages, databases, and blocks.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/block-types.md
1# Notion Block Types Reference23This document provides comprehensive documentation for all supported block types in the Notion API.45## Block Structure67Every block contains these common fields:89```json10{11"object": "block",12"id": "uuid",13"type": "block_type",14"parent": {"type": "page_id", "page_id": "..."},15"created_time": "2024-01-01T00:00:00.000Z",16"last_edited_time": "2024-01-01T00:00:00.000Z",17"created_by": {"object": "user", "id": "..."},18"last_edited_by": {"object": "user", "id": "..."},19"archived": false,20"in_trash": false,21"has_children": false,22"{type}": { /* type-specific properties */ }23}24```2526## Text Blocks2728### Paragraph2930```json31{32"type": "paragraph",33"paragraph": {34"rich_text": [{"type": "text", "text": {"content": "Paragraph text"}}],35"color": "default"36}37}38```3940Supports children (nested blocks).4142### Headings4344```json45{46"type": "heading_1",47"heading_1": {48"rich_text": [{"type": "text", "text": {"content": "Heading 1"}}],49"color": "default",50"is_toggleable": false51}52}53```5455Types: `heading_1`, `heading_2`, `heading_3`5657When `is_toggleable: true`, headings can contain children.5859### Quote6061```json62{63"type": "quote",64"quote": {65"rich_text": [{"type": "text", "text": {"content": "Quote text"}}],66"color": "default"67}68}69```7071Supports children.7273### Callout7475```json76{77"type": "callout",78"callout": {79"rich_text": [{"type": "text", "text": {"content": "Callout text"}}],80"icon": {"type": "emoji", "emoji": "💡"},81"color": "gray_background"82}83}84```8586Supports children. Icon can be emoji or file.8788### Code8990```json91{92"type": "code",93"code": {94"rich_text": [{"type": "text", "text": {"content": "const x = 1;"}}],95"caption": [],96"language": "javascript"97}98}99```100101Supported languages: `abap`, `arduino`, `bash`, `basic`, `c`, `clojure`, `coffeescript`, `cpp`, `csharp`, `css`, `dart`, `diff`, `docker`, `elixir`, `elm`, `erlang`, `flow`, `fortran`, `fsharp`, `gherkin`, `glsl`, `go`, `graphql`, `groovy`, `haskell`, `html`, `java`, `javascript`, `json`, `julia`, `kotlin`, `latex`, `less`, `lisp`, `livescript`, `lua`, `makefile`, `markdown`, `markup`, `matlab`, `mermaid`, `nix`, `objective-c`, `ocaml`, `pascal`, `perl`, `php`, `plain text`, `powershell`, `prolog`, `protobuf`, `python`, `r`, `reason`, `ruby`, `rust`, `sass`, `scala`, `scheme`, `scss`, `shell`, `sql`, `swift`, `typescript`, `vb.net`, `verilog`, `vhdl`, `visual basic`, `webassembly`, `xml`, `yaml`, `java/c/c++/c#`102103### Equation104105```json106{107"type": "equation",108"equation": {109"expression": "E = mc^2"110}111}112```113114Uses LaTeX/KaTeX syntax.115116## List Blocks117118### Bulleted List Item119120```json121{122"type": "bulleted_list_item",123"bulleted_list_item": {124"rich_text": [{"type": "text", "text": {"content": "List item"}}],125"color": "default"126}127}128```129130Supports children (nested list items).131132### Numbered List Item133134```json135{136"type": "numbered_list_item",137"numbered_list_item": {138"rich_text": [{"type": "text", "text": {"content": "List item"}}],139"color": "default"140}141}142```143144Supports children.145146### To-Do147148```json149{150"type": "to_do",151"to_do": {152"rich_text": [{"type": "text", "text": {"content": "Task"}}],153"checked": false,154"color": "default"155}156}157```158159Supports children.160161### Toggle162163```json164{165"type": "toggle",166"toggle": {167"rich_text": [{"type": "text", "text": {"content": "Toggle header"}}],168"color": "default"169}170}171```172173Supports children (the toggle content).174175## Media Blocks176177### Image178179```json180{181"type": "image",182"image": {183"type": "external",184"external": {"url": "https://example.com/image.png"},185"caption": []186}187}188```189190Or for uploaded files:191192```json193{194"type": "image",195"image": {196"type": "file",197"file": {"url": "https://...", "expiry_time": "..."},198"caption": []199}200}201```202203Supported formats: `.bmp`, `.gif`, `.heic`, `.jpeg`, `.jpg`, `.png`, `.svg`, `.tif`, `.tiff`204205### Video206207```json208{209"type": "video",210"video": {211"type": "external",212"external": {"url": "https://www.youtube.com/watch?v=..."},213"caption": []214}215}216```217218Supported formats: `.mp4`, `.mov`, `.avi`, `.mkv`, `.wmv`, plus YouTube links219220### Audio221222```json223{224"type": "audio",225"audio": {226"type": "external",227"external": {"url": "https://example.com/audio.mp3"},228"caption": []229}230}231```232233Supported formats: `.mp3`, `.wav`, `.ogg`, `.oga`, `.m4a`234235### File236237```json238{239"type": "file",240"file": {241"type": "external",242"external": {"url": "https://example.com/doc.pdf"},243"caption": [],244"name": "Document.pdf"245}246}247```248249250251```json252{253"type": "pdf",254"pdf": {255"type": "external",256"external": {"url": "https://example.com/document.pdf"},257"caption": []258}259}260```261262### Bookmark263264```json265{266"type": "bookmark",267"bookmark": {268"url": "https://example.com",269"caption": []270}271}272```273274### Embed275276```json277{278"type": "embed",279"embed": {280"url": "https://example.com/embed",281"caption": []282}283}284```285286**Note**: Embed rendering may differ from Notion app due to lack of iFramely integration.287288### Link Preview289290```json291{292"type": "link_preview",293"link_preview": {294"url": "https://example.com"295}296}297```298299**Read-only** - cannot be created via API.300301## Structural Blocks302303### Divider304305```json306{307"type": "divider",308"divider": {}309}310```311312### Table of Contents313314```json315{316"type": "table_of_contents",317"table_of_contents": {318"color": "default"319}320}321```322323### Breadcrumb324325```json326{327"type": "breadcrumb",328"breadcrumb": {}329}330```331332### Column List and Column333334```json335{336"type": "column_list",337"column_list": {}338}339```340341Column list contains column children:342343```json344{345"type": "column",346"column": {}347}348```349350Columns contain actual content blocks. **Note**: Column list must have at least 2 columns.351352### Table353354```json355{356"type": "table",357"table": {358"table_width": 3,359"has_column_header": true,360"has_row_header": false361}362}363```364365Table contains `table_row` children:366367```json368{369"type": "table_row",370"table_row": {371"cells": [372[{"type": "text", "text": {"content": "Cell 1"}}],373[{"type": "text", "text": {"content": "Cell 2"}}],374[{"type": "text", "text": {"content": "Cell 3"}}]375]376}377}378```379380**Note**: `table_width` can only be set at creation, not updated later.381382## Special Blocks383384### Child Page385386```json387{388"type": "child_page",389"child_page": {390"title": "Page Title"391}392}393```394395**Read-only** - use Create Page endpoint to create pages.396397### Child Database398399```json400{401"type": "child_database",402"child_database": {403"title": "Database Title"404}405}406```407408**Read-only** - use Create Database endpoint to create databases.409410### Synced Block411412Original synced block:413414```json415{416"type": "synced_block",417"synced_block": {418"synced_from": null419}420}421```422423Reference to synced block:424425```json426{427"type": "synced_block",428"synced_block": {429"synced_from": {430"type": "block_id",431"block_id": "original-block-id"432}433}434}435```436437**Note**: API doesn't support updating synced block content.438439### Template (Deprecated)440441```json442{443"type": "template",444"template": {445"rich_text": [{"type": "text", "text": {"content": "Template button"}}]446}447}448```449450**Deprecated** as of March 27, 2023 - use database templates instead.451452### Unsupported453454```json455{456"type": "unsupported",457"unsupported": {}458}459```460461Represents blocks not supported by the API.462463## Color Options464465Available colors for blocks that support the `color` property:466467- `default`468- `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`469- `gray_background`, `brown_background`, `orange_background`, `yellow_background`, `green_background`, `blue_background`, `purple_background`, `pink_background`, `red_background`470471## Blocks That Support Children472473The following block types can contain nested blocks:474- `paragraph`475- `bulleted_list_item`476- `numbered_list_item`477- `to_do`478- `toggle`479- `quote`480- `callout`481- `column_list` (contains `column` children)482- `column` (contains content blocks)483- `table` (contains `table_row` children)484- `synced_block`485- `template`486- `heading_1`, `heading_2`, `heading_3` (when `is_toggleable: true`)487- `child_page` (conceptually, via separate API calls)488- `child_database` (conceptually, via separate API calls)489