These only matter when authentication is on. Without auth, every route is already open.
Published pages
A page withpublished: true in its frontmatter is served as a rendered HTML page at /p/{path}, with no authentication. Use it for docs, guides, and anything that should stay public.
guides/onboarding.md
.md extension:
Accept: text/markdown to get the raw markdown, or Accept: application/json for a JSON payload, instead of HTML. Pages that are not published return 404, so readers cannot probe for pages that exist.
Publish a page
- Web UI
- REST
- MCP
Click Publish in the page header. Once published, the same menu offers Copy public link, View published page, and Unpublish. In the file tree, right-click a page to Publish it, or a folder to Publish folder or Unpublish folder in one step.
published: true and stamps published_at the first time. Republishing later keeps the original date. Unpublishing sets published: false. Each change is a normal frontmatter write, so it is committed to git and appears in history.
POST /api/kiwi/publish/bulkand/unpublish/bulkchange many pages in one commit and report how many changed or were skipped.GET /api/kiwi/publish/listlists published pages, newest first.GET /api/kiwi/publish/status?path=...returns the publish state and aview_countof permalink visits.
Images and attachments
Non-markdown files such as images and PDFs are public when a markdown page in the same folder, or in any parent folder, is published or hasvisibility: public. Relative image links in a published page therefore keep working at /p/....
Share links
A share link gives one file to someone who has no account, without publishing it. Each link has a long random token, an optional expiry, and an optional password.Terminal
Response
/api/kiwi/public/{token}. It returns the raw file, not rendered HTML. For a password-protected link, pass ?password=... or an X-Share-Password header; a wrong or missing password returns 401.
Terminal
- Omit
expiresInfor a link that never expires. It takes a duration such as24hor30m. - Every successful fetch increments
viewCount. GET /api/kiwi/share?path=...lists a file’s links. Revoke one withDELETE /api/kiwi/share/{id}, using the shortid, not the token.
Space visibility
[space] visibility decides how much of the API is open to readers with no credentials. It never opens writes.
.kiwi/config.toml
Unauthenticated requests are recorded with the actor
anonymous. Change visibility at runtime without a restart:
Terminal
[space] visibility in .kiwi/config.toml and takes effect immediately. GET /api/kiwi/space/info returns the current value.
Public pages in a private space
Two read-only routes serve individual pages that opt in withvisibility: public or published: true in frontmatter, whatever the space visibility:
Terminal
/public/tree lists only those pages and hides empty folders. Add filter=published to list published pages only. Pages that do not opt in return 404. Pages with visibility: public are also served at /p/{path}.