Improved
Notion’s API versionsAs a reminder, we only version backwards incompatible changes, so generally, you still get access to new features we release on the API without needing to upgrade. You can use different version headers for each request, so you can upgrade incrementally to get to the latest version.
2022-02-22 with the following backwards incompatible changes:
textin blocks has been renamed torich_text, to be consistent with the database property type.- Query database filter changes:
phoneandtextare no longer supported in query database filters when filtering byphone_numberandrich_textproperties. Usephone_numberandrich_textinstead.rollupquery database filters no longer accept thetextkeyword. Userich_textinstead.formulaquery database filters no longer accept thetextkeyword. Usestringinstead.
property_itemobjects now return atype,next_url, andid.- Deprecated the List Databases API endpoint.
The text property in content blocks has been renamed to rich_text
To be consistent with the database property type, we have renamed the text property to rich_text. This affects the following block types: paragraph, heading_1, heading_2, heading_3, callout, quote, bulleted_list_item, numbered_list_item, to_do ,toggle, code ,template.
Here is an example of the previous text property:
Previous Paragraph Block
rich_text property:
Updated Paragraph Block
Query database filter changes
phone and text no longer supported
Version 2022-02-22 no longer supports phone and text property filters in the query database endpoint. For consistency with the database property types, use phone_number and rich_text instead when filtering on phone_number and rich_text properties.
More concretely, this query database filter will throw a validation error:
JSON
JSON
rollup property filters accept rich_text instead of text
Rollup property filters must now be constructed with the rich_text keyword instead of the text keyword if the value of the rollup is an array of rich_text. Put concretely, if a page’s rollup property is rendered like so:
JSON
JSON
JSON
formula property filters accept string instead of text
Rollup property filters must now be constructed with the string keyword instead of the text keyword if the value of the formula is a string. Put concretely, if a page’s formula property is rendered like so:
JSON
JSON
JSON
Property list items now have types
Property item lists now always have typeproperty_item. Rollup aggregations are now returned inside that type.
We’ve also added the property id field and the next_url to fetch the next set of property items.
Here is an example of a previous rollup property_item list:
JSON
rollup property_item list:
JSON