Delete a Page
delete_pageDelete one Page from the main tree. Read the Page first and pass its exact revision. The root Page cannot be deleted. A Page that still has children is refused unless you pass recursive=true, which removes the whole branch as one change. Nothing is inverted afterwards: history only moves forward, so a delete is undone by reading it back out of history and writing the Pages again, at new ids. Pass archive_reason to archive instead, which move_page reverses.
A lock never refuses a delete — locks fence automatic curation, and you act on a member's instruction — but structure locked on the Page's read means a member deliberately chose to keep that arrangement: say which Page holds the lock and confirm before deleting it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"expected_rev": "<expected_rev>",
"parent_id": "<parent_id>",
"parent_expected_rev": "<parent_expected_rev>",
"context_id": "<context_id>"
},
"name": "delete_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | Positive serial id of the Page to delete. | |
| parent_id | Yes | Positive serial id of the Page's current parent. | |
| recursive | No | Also delete every Page below this one. Required when the Page has children; read the tree first so you know how much the branch contains. | |
| context_id | Yes | The destination context id from list_contexts. Required for writes. | |
| expected_rev | Yes | Exact Page revision returned by the latest Page read. | |
| archive_reason | No | Archive instead: what ended and what replaced it. The branch keeps its ids, prose and history outside the tree, found via search(status='archived'). For an accurate account of a subject that ended; delete what should not remain. | |
| parent_expected_rev | Yes | Exact parent revision returned by the latest Page read. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | Yes | ||
| kind | Yes | ||
| title | Yes | ||
| page_id | Yes | ||
| tree_id | Yes | ||
| warning | No | ||
| changeset_id | Yes | ||
| context_run_id | Yes | ||
| removed_page_id | Yes | ||
| affected_page_ids | No | ||
| changeset_sequence | Yes | ||
| collaboration_reloaded | No |