> ## Documentation Index
> Fetch the complete documentation index at: https://developers.notion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Property Schema Object

> Ask AI

Metadata that controls how a database property behaves.

## Database properties

Each database property schema object has at least one key which is the property type. This type contains behavior of this property. Possible values of this key are `"title"`, `"rich_text"`, `"number"`, `"select"`, `"multi_select"`, `"status"`, `"date"`, `"people"`, `"files"`, `"checkbox"`, `"url"`, `"email"`, `"phone_number"`, `"formula"`, `"relation"`, `"rollup"`, `"created_time"`, `"created_by"`, `"last_edited_time"`, `"last_edited_by"`.

## Title configuration

Each database must have exactly one database property schema object of type `"title"`. This database property controls the title that appears at the top of the page when the page is opened. Title database property objects have no additional configuration within the `title` property.

## Text configuration

Text database property schema objects have no additional configuration within the `rich_text` property.

## Number configuration

Number database property schema objects optionally contain the following configuration within the `number` property.

| Property | Type                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Example value |
| :------- | :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `format` | optional `string` (enum) | How the number is displayed in Notion. Potential values include: `number`, `number_with_commas`, `percent`, `dollar`, `canadian_dollar`, `euro`, `pound`, `yen`, `ruble`, `rupee`, `won`, `yuan`, `real`, `lira`, `rupiah`, `franc`, `hong_kong_dollar`, `new_zealand_dollar`, `krona`, `norwegian_krone`, `mexican_peso`, `rand`, `new_taiwan_dollar`, `danish_krone`, `zloty`, `baht`, `forint`, `koruna`, `shekel`, `chilean_peso`, `philippine_peso`, `dirham`, `colombian_peso`, `riyal`, `ringgit`, `leu`, `argentine_peso`, `uruguayan_peso`, `singapore_dollar`. | `"percent"`   |

## Select configuration

Select database property schema objects optionally contain the following configuration within the `select` property:

| Property  | Type                                                        | Description                                         | Example value |
| :-------- | :---------------------------------------------------------- | :-------------------------------------------------- | :------------ |
| `options` | optional array of [select option objects](#select-options). | Sorted list of options available for this property. |               |

### Select options

| Property | Type                     | Description                                                                                                                             | Example value |
| :------- | :----------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `name`   | `string`                 | Name of the option as it appears in Notion.                                                                                             | `"Fruit"`     |
| `color`  | optional `string` (enum) | Color of the option. Possible values include: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`. | `"red"`       |

## Multi-select configuration

Multi-select database property schema objects optionally contain the following configuration within the `multi_select` property:

| Property  | Type                                                                    | Description                           | Example value |
| :-------- | :---------------------------------------------------------------------- | :------------------------------------ | :------------ |
| `options` | optional array of [multi-select option objects](#multi-select-options). | Settings for multi select properties. |               |

### Multi-select options

| Property | Type                     | Description                                                                                                                             | Example value |
| :------- | :----------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `name`   | `string`                 | Name of the option as it appears in Notion.                                                                                             | `"Fruit"`     |
| `color`  | optional `string` (enum) | Color of the option. Possible values include: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`. | `"red"`       |

## Status configuration

Status database property schema objects optionally contain the following configuration within the `status` property:

| Property  | Type                                                        | Description                                                                                                                                                                        | Example value |
| :-------- | :---------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `options` | optional array of [status option objects](#status-options). | List of options available for this property. If omitted, defaults ("Not started", "In progress", "Done") are created along with three groups ("To-do", "In progress", "Complete"). |               |

### Status options

| Property | Type                     | Description                                                                                                                                                | Example value   |
| :------- | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------- |
| `name`   | `string`                 | Name of the option as it appears in Notion. Commas (",") are not valid. Names must be unique (case-insensitive).                                           | `"In progress"` |
| `color`  | optional `string` (enum) | Color of the option. Possible values include: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`.                    | `"blue"`        |
| `group`  | optional `string` (enum) | Status group to assign the option to. Possible values are `To-do`, `In progress`, and `Complete`. If omitted, the option is assigned to the `To-do` group. | `"In progress"` |

<Note>
  When creating a status property, three groups ("To-do", "In progress", "Complete") are always created. The `group` field assigns custom options to one of those groups. To rename, reorder, or otherwise reconfigure groups, use the Notion UI.
</Note>

## Date configuration

Date database property schema objects have no additional configuration within the `date` property.

## People configuration

People database property schema objects have no additional configuration within the `people` property.

## File configuration

File database property schema objects have no additional configuration within the `file` property.

## Checkbox configuration

Checkbox database property schema objects have no additional configuration within the `checkbox` property.

## URL configuration

URL database property schema objects have no additional configuration within the `url` property.

## Email configuration

Email database property schema objects have no additional configuration within the `email` property.

## Phone number configuration

Phone number database property schema objects have no additional configuration within the `phone_number` property.

## Formula configuration

Formula database property schema objects contain the following configuration within the `formula` property:

| Property     | Type     | Description                                                                                                                                                                      | Example value                                  |
| :----------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| `expression` | `string` | Formula to evaluate for this property. You can read more about the [syntax for formulas](https://notion.so/notion/Formulas-28f3f5c3ae644c59b4d862046ea6a541) in the help center. | `"if(prop(\"In stock\"), 0, prop(\"Price\"))"` |

## Relation configuration

Relation database property objects contain the following configuration within the `relation` property. In addition, they must contain a key corresponding with the value of `type`. The value is an object containing type-specific configuration. The type-specific configurations are defined below.

| Property      | Type                     | Description                                                                             | Example value                            |
| :------------ | :----------------------- | :-------------------------------------------------------------------------------------- | :--------------------------------------- |
| `database_id` | `string` (UUID)          | The database this relation refers to. This database must be shared with the connection. | `"668d797c-76fa-4934-9b05-ad288df2d136"` |
| `type`        | `string` (optional enum) | The type of the relation. Can be `"single_property"` or `"dual_property"`.              | `"single_property"`                      |

### Single property relation configuration

Single property relation objects have no additional configuration within the `single_property` property.

### Dual property relation configuration

Dual property relation objects have no additional configuration within the `dual_property` property.

## Rollup configuration

Rollup database property objects contain the following configuration within the `rollup` property:

| Property                 | Type              | Description                                                                                                                                                                                                                                                                                          | Example value |
| :----------------------- | :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `relation_property_name` | optional `string` | The name of the relation property this property is responsible for rolling up. This relation is in the same database where the new rollup property is being created. One of `relation_property_name` or `relation_property_id` must be provided.                                                     | `"Meals"`     |
| `relation_property_id`   | optional `string` | The `id` of the relation property this property is responsible for rolling up. This relation is in the same database where the new rollup property is being created. One of `relation_property_name` or `relation_property_id` must be provided.                                                     | `"fy:{"`      |
| `rollup_property_name`   | optional `string` | The name of the property in the related database that is used as an input to `function`. The related database must be shared with the connection. One of `rollup_property_name` or `rollup_property_id` must be provided.                                                                            | `"Name"`      |
| `rollup_property_id`     | optional `string` | The `id` of the property in the related database that is used as an input to `function`. The related database must be shared with the connection. One of `rollup_property_name` or `rollup_property_id` must be provided.                                                                            | `"fy:{"`      |
| `function`               | `string` (enum)   | The function that is evaluated for every page in the relation of the rollup. Possible values include: `count_all`, `count_values`, `count_unique_values`, `count_empty`, `count_not_empty`, `percent_empty`, `percent_not_empty`, `sum`, `average`, `median`, `min`, `max`, `range`, `show_original` | `"count"`     |

## Created time configuration

Created time database property schema objects have no additional configuration within the `created_time` property.

## Created by configuration

Created by database property schema objects have no additional configuration within the `created_by` property.

## Last edited time configuration

Last edited time database property schema objects have no additional configuration within the `last_edited_time` property.

## Last edited by configuration

Last edited by database property schema objects have no additional configuration within the `last_edited_by` property.
