POST
/pages/deleteDelete a page
Deletes a page, either by moving it to the trash or permanently removing it and its descendants. Supply pageId; set permanentlyDelete to true only when you intend to permanently delete the page and all its descendants.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Page deletion request. Specify the page with pageId and optionally choose whether to delete it permanently.
pageIdstringrequired
ID of the page to delete.
permanentlyDeletebooleanoptional
If `true`, permanently deletes the page and all its descendants from the database (requires space admin permission). If `false` (default), soft-deletes the page by setting `deletedAt` — it can be restored later from the trash.
200Confirms that the page was deleted.
dataunknownoptional
Response payload
statusintegeroptional
successbooleanoptional
403Returned when the request is forbidden.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
404Returned when the page is not found.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
Error handling
A 403 is returned when the authenticated user is not permitted to perform the requested deletion, and a 404 when the page is not found. pageId is required; permanently deleting a page and its descendants requires space admin permission. permanentlyDelete defaults to false when omitted.