Databases
Objects
Every object and enum the Databases tools accept.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Every object and enum the Databases tools accept.
| Field | Type | Description |
|---|---|---|
parent * | DatabaseParent | Where the database is created. |
title | RichText[] | The title of the database. max 100 items |
description | RichText[] | The description of the database. max 100 items |
isInline | boolean | Whether the database renders inside its parent page rather than as a page of its own. Not inline when absent. |
initialDataSource | InitialDataSource | The first data source, and the columns it starts with. |
databaseType | "tasks" | "projects" | "skills" | Create a database with Notion’s canonical schema for tasks, projects or skills. When title is absent the database is named after the type. |
icon | Icon | The database’s icon. |
cover | Cover | The database’s cover image. |
| Field | Type | Description |
|---|---|---|
type | "page_id" | "workspace" | The type of parent. |
pageId | string | The ID of the parent page. |
workspace | boolean | Always true, to create the database at the top level of the workspace. |
| Field | Type | Description |
|---|---|---|
properties * | map of PropertyConfiguration | The columns of the first data source, keyed by name. Exactly one must be the title column. |
| Field | Type | Description |
|---|---|---|
type | string | The type of the column. Returned on a read; on a write Notion infers it from whichever configuration field below is set. |
description | string | The description of the property. max length 280 |
title | EmptyConfig | The title column. Every data source has exactly one, and it cannot be deleted. Send an empty object. |
richText | EmptyConfig | A text column. Send an empty object. |
number | NumberConfig | A number column. |
select | SelectConfig | A single-choice column. |
multiSelect | SelectConfig | A multiple-choice column. |
status | StatusConfig | A status column, whose options belong to three groups. |
date | EmptyConfig | A date column. Send an empty object. |
people | EmptyConfig | A people column. Send an empty object. |
files | EmptyConfig | A files column. Send an empty object. |
checkbox | EmptyConfig | A checkbox column. Send an empty object. |
url | EmptyConfig | A URL column. Send an empty object. |
email | EmptyConfig | An email column. Send an empty object. |
phoneNumber | EmptyConfig | A phone number column. Send an empty object. |
formula | FormulaConfig | A column computed from the page’s other properties. |
relation | RelationConfig | A column of links to pages in another data source. |
rollup | RollupConfig | A column that gathers values through a relation. |
createdTime | EmptyConfig | When the page was created. Send an empty object. |
createdBy | EmptyConfig | Who created the page. Send an empty object. |
lastEditedTime | EmptyConfig | When the page was last edited. Send an empty object. |
lastEditedBy | EmptyConfig | Who last edited the page. Send an empty object. |
lastVisitedTime | EmptyConfig | When the page was last visited. Send an empty object. |
uniqueId | UniqueIdConfig | An ID Notion increments for each new page. |
verification | EmptyConfig | A wiki page’s verification status. Send an empty object. |
button | EmptyConfig | A button column. Send an empty object. |
location | EmptyConfig | A location column. Send an empty object. |
place | EmptyConfig | A place column. Send an empty object. |
| Field | Type | Description |
|---|---|---|
format | string | How the number is formatted — number, number_with_commas, percent, dollar, euro, pound, yen and the other currency codes Notion supports. The API declares this an open string rather than a fixed set, so a format added later is accepted. |
| Field | Type | Description |
|---|---|---|
options | SelectOption[] | The available options. max 100 items |
| Field | Type | Description |
|---|---|---|
name | string | The name of the option, as it appears in Notion. |
id | string | The ID of an existing option, when updating it rather than adding one. |
color | SelectColor | The color of the option. |
description | string | The description of the option. |
| Field | Type | Description |
|---|---|---|
options | StatusOption[] | The available options. max 100 items |
| Field | Type | Description |
|---|---|---|
name | string | The name of the option, as it appears in Notion. |
id | string | The ID of an existing option, when updating it rather than adding one. |
color | SelectColor | The color of the option. |
description | string | The description of the option. |
group | "To-do" | "In progress" | "Complete" | Which of the three status groups this option belongs to. |
| Field | Type | Description |
|---|---|---|
expression | string | The formula, in Notion’s formula language. |
| Field | Type | Description |
|---|---|---|
dataSourceId * | string | The ID of the data source the relation points at. |
type | "single_property" | "dual_property" | Whether the relation is mirrored on the other data source. |
singleProperty | SinglePropertyRelation | A one-way relation, which adds no property to the related data source. Send an empty object. |
dualProperty | DualPropertyRelation | A two-way relation, mirrored by a property on the related data source. |
| Field | Type | Description |
|---|---|---|
syncedPropertyId | string | The ID of the mirrored property on the related data source. |
syncedPropertyName | string | The name of the mirrored property on the related data source. |
| Field | Type | Description |
|---|---|---|
function * | string | How the gathered values are aggregated: count, count_values, empty, not_empty, unique, show_unique, percent_empty, percent_not_empty, sum, average, median, min, max, range, earliest_date, latest_date, date_range, checked, unchecked, percent_checked, percent_unchecked, count_per_group, percent_per_group or show_original. |
relationPropertyName | string | The name of the relation column to follow. |
relationPropertyId | string | The ID of the relation column to follow. |
rollupPropertyName | string | The name of the property to gather from the related pages. |
rollupPropertyId | string | The ID of the property to gather from the related pages. |
| Field | Type | Description |
|---|---|---|
prefix | string | The prefix, for example RC to produce RC-1. Null for none. |
| Field | Type | Description |
|---|---|---|
parent | DatabaseParent | A new parent, to move the database. |
title | RichText[] | The title of the database. max 100 items |
description | RichText[] | The description of the database. max 100 items |
isInline | boolean | Whether the database renders inside its parent page. |
icon | Icon | The database’s icon. |
cover | Cover | The database’s cover image. |
inTrash | boolean | Whether the database is in the trash. False restores it. |
isLocked | boolean | Whether the database is locked against editing in the Notion app. It does not block writes through the API. |
| Value |
|---|
default |
blue |
brown |
gray |
green |
orange |
pink |
purple |
red |
yellow |
Was this page helpful?