Update data source properties
The API represents columns of a data source in the Notion app UI as data sourceproperties.
To use the API to update a data source's properties, send aPATCH request with aproperties body param.
Remove a property
To remove a data source property, set the property object to null.
"properties": { "J@cT": null,}"properties": { "propertyToDelete": null}Rename a property
To change the name of a data source property, indicate the new name in thename property object value.
"properties": {"J@cT": {"name": "New Property Name" }}"properties": { "Old Property Name": { "name": "New Property Name }}| Property | Type | Description |
|---|---|---|
name | string | The name of the property as it appears in Notion. |
Update property type
To update the property type, the property schema object should contain the key of the type. This type contains behavior of this property. Possible values of this key are"title","rich_text","number","select","multi_select","date","people","files","checkbox","url","email","phone_number","formula","relation","rollup","created_time","created_by","last_edited_time","last_edited_by". Within this property, the configuration is aproperty schema object.
❗️
Limitations
Note that the property type of the
titlecannot be changed.It's not possible to update the
nameoroptionsvalues of astatusproperty via the API.
Select configuration updates
To update an existing select configuration, the property schema object optionally contains the following configuration within theselect property:
| Property | Type | Description | Example value |
|---|---|---|---|
options | optional array ofexisting select options andselect option objects | Settings for select properties. If an existing option is omitted, it will be removed from the data source property. New options will be added to the data source property. |
Existing select options
Note that the name and color of an existing option cannot be updated.
| Property | Type | Description | Example value |
|---|---|---|---|
name | optionalstring | Name of the option. | "Fruit" |
id | optionalstring | ID of the option. | "ff8e9269-9579-47f7-8f6e-83a84716863c" |
Multi-select configuration updates
To update an existing select configuration, the property schema object optionally contains the following configuration within themulti_select property:
| Property | Type | Description | Example value |
|---|---|---|---|
options | optional array ofexisting select options andmulti-select option objects | Settings for multi select properties. If an existing option is omitted, it will be removed from the data source property. New options will be added to the data source property. |
Existing multi-select options
Note that the name and color of an existing option cannot be updated.
| Property | Type | Description | Example value |
|---|---|---|---|
name | string | Name of the option as it appears in Notion. | "Fruit" |
id | optionalstring | ID of the option. | "ff8e9269-9579-47f7-8f6e-83a84716863c" |
Limitations
Formula maximum depth
Formulas in Notion can have high levels of complexity beyond what the API can compute in a single request. Forformula property values that exceedhave or exceed depth of 10 referenced tables, the API will return a "Formula depth" error as a"validation_error"
As a workaround, you can retrieve theformula property object from theRetrieve a data source endpoint and use the formula expression to compute the value of more complex formulas.
Unsupported Rollup Aggregations
Due to the encoded cursor nature of computing rollup values, a subset of aggregation types are not supported. Instead the endpoint returns a list ofall property_item objects for the following rollup aggregations:
show_unique(Show unique values)unique(Count unique values)median(Median)
"Could not find page/data source" Error
A page property of typerollup andformula can involve computing a value based on the properties in anotherrelation page. As such the integration needs permissions to the otherrelation page. If the integration doesn't have permissions page needed to compute the property value, the API will return a"object_not_found" error specifying the page the integration lacks permissions to.
Property value doesn't match UI after pagination
If a property value involvespagination and the underlying properties or pages used to compute the property value change whilst the integration is paginating through results, the final value will impacted and is not guaranteed to be accurate.