---
title: "Delete page tree"
method: DELETE
path: "/wiki/rest/api/content/{id}/pageTree"
tags: ["Experimental"]
---

# Delete page tree

`DELETE /wiki/rest/api/content/{id}/pageTree`

Moves a pagetree rooted at a page to the space's trash:

- If the content's type is `page` and its status is `current`, it will be trashed including
all its descendants.
- For every other combination of content type and status, this API is not supported.

This API accepts the pageTree delete request and returns a task ID.
The delete process happens asynchronously.

 Response example:
 <pre><code>
 {
      "id" : "1180606",
      "links" : {
           "status" : "/rest/api/longtask/1180606"
      }
 }
 </code></pre>
 Use the `/longtask/<taskId>` REST API to get the copy task status.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
'Delete' permission for the space that the content is in.

## Path parameters

- `id` string, required

## Response `202`

Returned if the request to trash content and all its current page descendants, is successfully accepted.

- LongTask
  - `ari` string — the ARI for the long task, based on its ID
  - `id` string, required — a unique identifier for the long task
  - `links` object, required
    - `status` string — The URL to retrive status of long task.

## Other responses

- `400` — Returned if the content id is invalid or id does not represents a 'CURRENT' page.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `403` — Returned if the calling user can not delete the content with specified id.
- `404` — Returned if; - There is no content with the given ID. - The requesting user does not have permission to trash the content or any of it's descendant pages.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
