---
title: "Edit a wiki page"
method: PATCH
path: "/repos/{owner}/{repo}/wiki/page/{pageName}"
tags: ["repository"]
---

# Edit a wiki page

`PATCH /repos/{owner}/{repo}/wiki/page/{pageName}`

## Request

- Base URL: `https://demo.gitea.com/api/v1`
- URL: `https://demo.gitea.com/api/v1/repos/{owner}/{repo}/wiki/page/{pageName}`
- Auth: one of:
  - HTTP basic
  - API key in query parameter `token`
  - API key in query parameter `access_token`
  - API key in header `Authorization`
  - API key in query parameter `sudo`
  - API key in header `Sudo`
  - API key in header `X-GITEA-OTP`
- TypeScript: <https://skmtc.dev/gitea/apis/gitea-api/docs/repos/:owner/:repo/wiki/page/:pageName/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `owner` string, required
- `repo` string, required
- `pageName` string, required

## Request body

- CreateWikiPageOptions: CreateWikiPageOptions form for creating wiki
  - `content_base64` string: content must be base64 encoded
  - `message` string: optional commit message summarizing the change
  - `title` string: page title. leave empty to keep unchanged

## Response `200`

WikiPage

- WikiPage: WikiPage a wiki page
  - `commit_count` integer: The number of commits that modified this page
  - `content_base64` string: Page content, base64 encoded
  - `footer` string: The footer content for the wiki page
  - `html_url` string: The HTML URL to view the wiki page
  - `last_commit` WikiCommit: WikiCommit page commit/revision
    - `author` CommitUser
      - `date` string: Date is the commit date in string format
      - `email` string, email: Email is the person's email address
      - `name` string: Name is the person's name
    - `commiter` CommitUser
      - `date` string: Date is the commit date in string format
      - `email` string, email: Email is the person's email address
      - `name` string: Name is the person's name
    - `message` string: The commit message
    - `sha` string: The commit SHA hash
  - `sidebar` string: The sidebar content for the wiki page
  - `sub_url` string: The sub URL path for the wiki page
  - `title` string: The title of the wiki page

## Other responses

- `default`: APIError is error format response

## Changes

- **2026-10-28** `7ef50c4c527f`: 4 info
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `404`
  - removed the non-success response with the status `423`

[Operation history](https://skmtc.dev/gitea/apis/gitea-api/changes/repos/:owner/:repo/wiki/page/:pageName/patch.md)

---

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