---
title: "Create or update a page (role&#58; member+)"
method: PUT
path: "/api/pages/{path}"
tags: ["Wiki"]
---

# Create or update a page (role&#58; member+)

`PUT /api/pages/{path}`

## Request

- Base URL: `https://api.witwiki.app`
- URL: `https://api.witwiki.app/api/pages/{path}`
- Auth: HTTP bearer

Parses `[[wikilinks]]` from content and refreshes the link graph. Audit logged server-side.

## Request body

- PageInput
  - `title` string, required
  - `content` string, required: Markdown; may contain [[wikilinks]]
  - `metadata` object

## Response `200`

The saved page

- Page
  - `path` string
  - `title` string
  - `content` string
  - `metadata` object
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `version_id` string

## Other responses

- `400`: Invalid input
- `403`: Authenticated but lacks the required role or scope

---

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