Skip to main content
Send a block as an object with one key, the block type. type is optional and must match that key, and object: "block" is accepted. Other keys from a block you read, such as id and parent, return 400, so send only the type key and its value.
rich_text uses the same items as properties. See Rich text items. A value you read can usually be sent back as it is, with these exceptions:
  • A paragraph you read has icon: null, which returns 400. Leave icon out.
  • A table, column_list, or tab you read has no children, which they need. Read the children and add them.
  • An image you read has type, which returns 400 when updating. Leave it out.

Block types

These types can’t be written: child_page, child_database, and unsupported. To add a subpage, use Create a page with parent.page_id. Inline databases can’t be created through the API. File uploads aren’t available, so file_upload values return 404.

Levels

A request can hold 3 levels of blocks, counting the top level. A column_list and its column blocks count as one level. To go deeper, append to the third-level block in a later request. A column_list can only be at the top level of a request, and a table can’t be at the third level. To put one deeper, append it to that block in a later request. Limits on item counts and size are in Values and request size.

Colors

color accepts default, gray, brown, orange, yellow, green, blue, purple, pink, red, and the same colors with _background, such as blue_background.

Icons

callout.icon accepts emoji, custom_emoji (from this team), and icon (name and color). null and external return 400. Without an icon, a callout uses 💡.

What Bottari changes when saving

Language values

language must be one of these values. abap, abc, agda, arduino, ascii art, assembly, bash, basic, bnf, c, c#, c++, clojure, coffeescript, coq, css, dart, dhall, diff, docker, ebnf, elixir, elm, erlang, f#, flow, fortran, gherkin, glsl, go, graphql, groovy, haskell, hcl, html, idris, java, javascript, json, julia, kotlin, latex, less, lisp, livescript, llvm ir, lua, makefile, markdown, markup, matlab, mathematica, mermaid, nix, objective-c, ocaml, pascal, perl, php, plain text, powershell, prolog, protobuf, purescript, python, r, racket, reason, ruby, rust, sass, scala, scheme, scss, shell, smalltalk, solidity, sql, swift, toml, typescript, vb.net, verilog, vhdl, visual basic, webassembly, xml, yaml, java/c/c++/c#

Tables

table_width is the number of cells in each row, and every row must have that many. It can’t be changed later. To add a row, append table_row blocks to the table.

Columns

A column_list needs at least 2 columns and holds at most 5. If deleting a column leaves one, the list is removed and its blocks move up to the list’s place.

Tabs

Each paragraph under a tab is one tab. Its text is the tab’s name, its icon is the tab’s icon, and its children are the tab’s content. Only these paragraphs can have an icon. Elsewhere it returns 400 Cannot set icon on a paragraph block that is not a direct child of a tab block.

Synced blocks

Blocks you append to a copy’s ID go into the original. An original can’t hold another synced block, and the response is 400. A copy needs an original the integration can read.

Errors

Validation messages come in three forms. If any block is rejected, nothing in the request is saved.