---
title: "Re-file a wiki page in the table of contents"
method: PATCH
path: "/projects/{projectId}/wiki/{pageId}/move"
tags: ["Projects"]
---

# Re-file a wiki page in the table of contents

`PATCH /projects/{projectId}/wiki/{pageId}/move`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/projects/{projectId}/wiki/{pageId}/move`
- Auth: HTTP bearer

Sets the page's parent and its rank among its new siblings. `parentId: null` brings it back to the root. A page cannot be filed under itself or under one of its own sub-pages — the branch would disappear from the summary.

## Path parameters

- `projectId` string, uuid, required
- `pageId` string, uuid, required

## Request body

- object
  - `parentId` string, uuid, nullable, required
  - `position` integer, required: Rank among the new siblings; past the end of the list it lands last.

## Response `200`

- object
  - `page` ProjectWikiPageDetail, required: An open page: its current text, a page of its history (newest first) and its sub-pages as table-of-contents entries. Every wiki write returns this same shape, so an editor never has to re-read the page it just saved.
    - `id` string, uuid, required
    - `title` string, required
    - `path` string, required
    - `position` integer, required
    - `parentId` string, uuid, nullable, required: null for a page sitting at the root of the wiki.
    - `content` string, required: Always identical to `history[0].content` — the two are written in the same transaction and cannot diverge.
    - `history` ProjectWikiRevision[], required: Newest first, capped by `limit` (50 by default).
      - `id` string, uuid, required
      - `sha` string, required: Short content fingerprint, as Git displays one.
      - `at` string, date-time, required
      - `author` string, required
      - `message` string, required: Why the page was written, in the spirit of a commit message.
      - `content` string, required: The page's full Markdown at that moment.
    - `historyTotal` integer, required: Revisions the page has in all, beyond the slice returned.
    - `children` ProjectWikiNode[], required
      - `id` string, uuid, required
      - `title` string, required
      - `path` string, required
      - `position` integer, required: Rank among its siblings.
      - `revisionCount` integer, required
      - `content` string
      - `children` ProjectWikiNode[], required

## Other responses

- `400`: Validation error, malformed id, an unknown parent page, or a move that would put the page under itself.
- `401`: Missing, malformed, or invalid bearer token / API key, or revoked session (SESSION_REVOKED).
- `404`: Not found, or the caller is not authorized to access this resource.

---

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