Skip to main content
The API does not support permanently deleting pages.
To trash a page via the API, send an Update page request with the in_trash body param set to true. To restore a page from the trash, set in_trash to false.
archived was removed in 2026-03-11In API versions before 2026-03-11, archived was a deprecated alias for in_trash. Starting with 2026-03-11, only in_trash is accepted. If your connection uses an older API version and still sends archived, update to in_trash before upgrading.

Set your token and page ID

Set your integration token and the ID of the page once in your shell. The cURL and JavaScript examples below read both values from the environment. Never put your token in browser page source, client bundles, or public repositories.

Example request: trash a Notion page

If you are using Notion’s JavaScript SDK to interact with the REST API, use the update method available for Notion pages.
If successful, the API responds with a 200 HTTP status code and the trashed page object. This excerpt shows the fields that confirm the change:
Refer to the error codes documentation for possible errors.

Example request: restore a Notion page

The API can’t restore a top-level page that isn’t in a teamspace. It returns a 400 validation_error instead, so restore that page in the Notion app. Top-level teamspace pages also show a workspace parent, but the API can restore them.
If successful, the API responds with a 200 HTTP status code and the restored page object. Refer to the error codes documentation for possible errors.