---
title: "Delete a page and its subtree"
method: DELETE
path: "/api/pages/{id}"
tags: ["pages"]
---

# Delete a page and its subtree

`DELETE /api/pages/{id}`

## Request

- Base URL: `https://telawiki.com`
- URL: `https://telawiki.com/api/pages/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `tela_session`

`editor+`. Soft delete — the page and **all of its descendants** move to the space trash.

## Response `204`

Deleted.

## Other responses

- `400`: `invalid_id` — a path parameter was not a positive integer.
- `403`: `forbidden` — **also returned when the page does not exist**, so page ids cannot be enumerated. When the page happens to live in a published space, `code` is `forbidden_public` and `public_path` points at the no-login reader. Also `api_key_scope` / `api_key_space_scope`.
- `404`: `not_found`.
- `500`: `internal` — server error.

---

[API](https://skmtc.dev/telawiki/apis/tela-rest-api.md) · [All operations](https://skmtc.dev/telawiki/apis/tela-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telawiki/apis/tela-rest-api/revisions/f316f31f6fcb?raw)
