2021-08-16 with the following backwards incompatible changes:
Unknown Keys Will Fail Validation
Rollup Property Types
Append Block Children
URL Safe Property IDs
Empty Properties Are Now Returned
Unknown Keys Will Fail Validation
Previously, our endpoints used to only validate against the expected keys in both request body parameters as well as query parameters resulting in some ambiguity between incorrect behavior and invalid inputs. Going forward, to improve the developer experience we will be raising validation errors if keys that are not supported by our API are passed in to requests.Migration TipTo safely migrate to
2021-08-16, we recommend thoroughly testing your API calls against the 2021-08-16 version, to see if you get any validation errors due to this change. If you do, remove any parameters that are rejected due to unknown keys.Changes to Array Rollup Property Types
Starting with the Notion-Version header2021-08-16, we are introducing a change to the response for rollup properties on a page which are arrays. Number and date rollups are unaffected. Specifically, the type of elements within an array rollup has been made consistent with property types across other API endpoints:
| Before | After |
|---|---|
type: "file" | type: "files" |
type: "text" | type: "rich_text" |
type: "person" | type: "people" |
2021-08-16:
JSON
Append Block Children returns a list of blocks
The Append Block Children endpoint will now return a list of the newly created Block object children. Previously the endpoint returned the block object of the parent block. Developers can instead use the Retrieve a block endpoint to get the full block object for a specifiedblock_id.
This change allows developers to get block_id’s and additional information of the new blocks right after they’re created. Note: only the first level block children are returned. To get sub-children, use the Retrieve block children endpoint.
JSON
Property IDs are now URL Safe
Endpoints that return property IDs as part of the response body will now return new URL safe encoded property IDs. Any request that uses property IDs (such as Update a database or Update a page) should use the new URL safe ID. This ensures all property IDs can be referenced in the URL of any new endpoints moving forward.| Before | After |
|---|---|
DoS\ | DoS%5C |
title | title |
vEKn | vEKn |
Empty database properties are now returned as null
Previously, empty properties of date, email, number, and rollup types were omitted from the page response. Now, these empty properties are returned with null values.
JSON