Levain LabsLevain Labs
ApiWikis

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/. Paths that would escape the repo (.., hidden segments, CLAUDE.md) are rejected with 404.

PUT
/api/v1/wikis/{wiki_id}/pages/{page_path}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

wiki_id*Wiki Id
Formatuuid
page_path*Page Path

Header Parameters

X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*Body

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"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}