---
title: "Rename a wiki page and/or write a new revision"
method: PATCH
path: "/projects/{projectId}/wiki/{pageId}"
tags: ["Projects"]
---

# Rename a wiki page and/or write a new revision

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

## Request

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

Send `title`, `content`, or both — a patch asking for neither would be a 200 that wrote nothing. Rewriting the text exactly as it already stands is refused for the same reason: it would look like a revision that was never recorded. `message` is the note left on the revision, like a commit message.

## Path parameters

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

## Request body

- object
  - `title` string
  - `content` string
  - `message` string
  - `autosave` boolean: Editor autosave: extends the newest revision when it belongs to the same author and the same `sessionId`, carries no message and is less than 10 minutes old.
  - `sessionId` string: The editor writing (one per browser tab). Two sessions never share a revision.
  - `baseSha` string: The sha of the head revision the caller edited on. If the page changed since, nothing is written and the answer is 409 `WIKI_CONFLICT`.

## 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, or content identical to the current revision (nothing to record).
- `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.
- `409`: The page changed since `baseSha`: `error` is `WIKI_CONFLICT` and `page` is the current page.

---

[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)
