/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.
List spaces
Returns every registered space with file counts and size.GET /api/spaces
object[]
Response
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.
spaces above, or 404 if the name is unknown.
List init templates
Returns the scaffolds you can pass astemplate when creating a space.
GET /api/init-templates
object[]
Response
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
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
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.Related
Multi-space
Routing, space selection, and per-space keys.
Configuration
Declare spaces with
[[spaces]].