---
title: "Update a page's title, body, properties, or draft status"
method: PATCH
path: "/api/pages/{id}"
tags: ["pages"]
---

# Update a page's title, body, properties, or draft status

`PATCH /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+`. A change to `title` or `body` snapshots a revision first. **`props` replaces the whole bag** — send the properties you want to keep. There is no section-level patch over REST; the `patch_page` MCP tool is the only place heading-path targeting exists.

## Request body

- object
  - `title` string
  - `body` string: The whole markdown document.
  - `props` PageProps: Free-form page properties. Reserved keys are dropped. Two are load-bearing: `deck: true` makes the body a Slidev presentation, `sheet: true` makes it a spreadsheet — both are then stored verbatim, frontmatter included.
  - `status` 'draft' | 'published': A `draft` is labelled in the app and never served on public spaces or share links until published.
  - `base_version` integer: The page `version` you last read. If the page has changed since, the write is refused with `409 version_conflict` instead of overwriting that edit. Omit for last-write-wins.
  - `reset_collab` boolean: Set when the body was edited outside the page's live collaborative session (e.g. as raw markdown). Anyone with the page open in the editor reloads it from the new body.

## Response `200`

The page.

- object
  - `page` Page, required
    - `id` integer, required
    - `space_id` integer, required
    - `parent_id` integer, nullable, required
    - `title` string, required
    - `body` string, required: Canonical markdown. This is the whole document — tela has no block model.
    - `position` integer, required: Sort order among siblings.
    - `props` PageProps: Free-form page properties. Reserved keys are dropped. Two are load-bearing: `deck: true` makes the body a Slidev presentation, `sheet: true` makes it a spreadsheet — both are then stored verbatim, frontmatter included.
    - `created_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.
    - `updated_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.
    - `version` integer: Advances on every title/body/props change. Send it back as `base_version` on update to refuse overwriting an edit you haven't seen.
    - `status` 'draft' | 'published': A `draft` is labelled in the app and never served on public spaces or share links until published.

## Other responses

- `400`: `invalid_json`, `no_fields`, `invalid_title`, or `invalid_status`.
- `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`.
- `409`: `version_conflict`: `base_version` is stale. Re-read the page and reapply your change.
- `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)
