---
title: "Reparent, reorder, or move a page to another space"
method: POST
path: "/api/pages/{id}/move"
tags: ["pages"]
---

# Reparent, reorder, or move a page to another space

`POST /api/pages/{id}/move`

## Request

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

`editor+` on the source space, and on the target space when `space_id` changes. Field **presence** matters: an omitted `parent_id` leaves the parent alone, while an explicit `null` detaches the page to the top level.

## Request body

- object
  - `space_id` integer
  - `parent_id` integer, nullable
  - `position` integer: 0-based index among siblings; clamped to last.

## 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_space_id`, `invalid_parent_id`, `invalid_position`, `space_not_found`, `parent_not_found`, `parent_space_mismatch`, or `cycle` (the move would make the page its own ancestor).
- `402`: `quota_exceeded` — a plan limit (pages, storage) was reached.
- `403`: `forbidden` (no access, or the role is too low), `viewer_no_write`, `api_key_scope` (the token's scope forbids this method), or `api_key_space_scope` (the token is pinned to another space).
- `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)
