Database Properties

Database property objects are rendered in the Notion UI as database columns.

Database Property

Properties

A database property object consists of the following data:

PropTypeDescription
id*stringUnique identifier of the column.
type*PropertyTypeType of the column.
name*stringName of the column.
iconIconDataDisplayed icon of the column.
widthstringWidth of the column.
descriptionstringDescription of the column.
wrappedbooleanWhether each cell in the column should be wrapped.
hiddenbooleanWhether the column is hidden.
isDeletedbooleanWhether the column is deleted.
isCountCappedbooleanWhether the count of the column should be capped.
countMethodCountMethodThe count method of the column.

Row Data Type

The data of a row.

Properties

PropTypeDescription
id*stringUnique identifier of the row.
properties*Record<string, CellDataType>The row data where the key-value is given by the column ID and the cell data.
iconIconDataDisplayed icon of the column.

Cell Data Type

There are various type of cells, where each cell consists of:

  1. the common properties
  2. the value corresponding to it property type

Common Properties

PropTypeDescription
type*PropertyTypeThe property type.
id*stringUnique identifier of the cell.

Title Cell

PropTypeDescription
type*"title"-
id*stringUnique identifier of the cell.
value*stringThe title value.

Example

{
  type: "title",
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  value: "New title"
}

Text Cell

PropTypeDescription
type*"text"-
id*stringUnique identifier of the cell.
value*stringThe text value.

Example

{
  type: "text",
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  value: "Some description..."
}

Checkbox Cell

PropTypeDescription
type*"checkbox"-
id*stringUnique identifier of the cell.
checked*booleanWhether the checkbox is checked.

Example

{
  type: "checkbox",
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  checked: true,
}

On this page