Put Wiki Page
Create or update a page in the knowledge base.
Create or update a page in the knowledge base.
The supplied body replaces the page content entirely. A user_edited_at
timestamp is automatically added to the page's YAML front matter so the
knowledge-base maintenance agent treats user-authored sections as append-only on
its next pass.
page_path must end in .md and must sit at the repo root or under
entities/, concepts/, or sources/. The seeded root pages (overview.md,
DESIGN.md, VOICE.md) are writable like any other page; only deleting them is
restricted. The schema is managed through PUT /api/v1/wikis/{wiki_id}/schema,
so CLAUDE.md is rejected here. Paths that would escape the repo (.., hidden
segments) are rejected with 404.
A knowledge base that has never been accessed is provisioned by the first write, so a headless workspace can seed its context through this endpoint alone.
Authorization
HTTPBearer In: header
Path Parameters
uuidHeader Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://api.levainlabs.com/api/v1/wikis/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/string" \ -H "Content-Type: application/json" \ -d '{ "body": "string" }'{
"path": "string",
"byte_size": 0,
"body": "string"
}