Skip to main content
Every KiwiFS server runs a space manager, so these routes exist even when you serve a single folder. They live at /api/spaces and /api/init-templates, outside /api/kiwi/. Per-space file APIs stay at /api/kiwi/... or /api/kiwi/{space}/...; see Multi-space for routing.
KiwiFS does not apply [auth] to /api/spaces or /api/init-templates. Anyone who can reach the port can create and delete spaces. Block or authenticate these paths at your reverse proxy in production.

List spaces

Returns every registered space with file counts and size. GET /api/spaces
object[]
Response
The primary space is named default unless [space] name is set in its config.

Get a space

Returns one space’s metadata. GET /api/spaces/:name
string
required
Space name.
Returns the same object as one entry of spaces above, or 404 if the name is unknown.

List init templates

Returns the scaffolds you can pass as template when creating a space. GET /api/init-templates
object[]
Response
The full set is adr, cms, data, kb, log, memory, prompt, research, runbook, tasks, wiki, and blank, sorted by label with blank last.

Create a space

Scaffolds a folder from a template, builds its index and git repo, and registers it. POST /api/spaces
string
required
Unique space name. Cannot contain /, \, spaces, or dots.
string
Folder for the space. Defaults to .spaces/{name} inside the primary space’s root, which hides it from the primary space’s tree.
string
default:"blank"
Init template ID from GET /api/init-templates.
201 Created
Returns 409 if the name already exists, and 400 for an invalid name or template. The space is saved to .kiwi/spaces.json in the primary space and restored on restart.

Delete a space

Unregisters a space and moves its folder aside. DELETE /api/spaces/:name
string
required
Space name.
Response
Returns 404 if the name is unknown.
Deletion is a soft delete. KiwiFS renames the root to {root}.deleted-{timestamp} (for example research.deleted-20261019T093000), so you can recover the files or remove them yourself.

Multi-space

Routing, space selection, and per-space keys.

Configuration

Declare spaces with [[spaces]].
Last modified on October 19, 2026