Skip to content
Create a mount folder

Create a mount folder

Create a folder in a mount, with any missing parent folders. Send no body.

POST/api/v1/mounts/:mountId/folders

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/mounts/0199a1c4-5b6e-7a10-9c2d-3e4f5a6b7c8d/folders?path=/guides", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();

Use your server-side apiKey. Replace the example IDs.

Path parameters#

mountIdUUIDrequired

The mount's ID, returned as id when the mount was created.

Query parameters#

pathstringrequired

A path inside the mount, such as /guides/refunds.md for /workspace/docs/guides/refunds.md in a mount at /workspace/docs. guides/refunds.md names the same file. No empty, . or .. segments and no trailing slash. URL-encode it.

Responses#

The folder was created, with any missing parent folders.

201 response
{
  "status": "created",
  "entry": {
    "path": "/guides",
    "type": "directory",
    "size": 0,
    "hash": "",
    "modifiedAt": "2026-10-10T12:00:00.000Z"
  }
}
More about this endpoint

Returns 201 when the folder was created, or 200 with status unchanged when it already existed, so a retry is safe.

This write is direct: it skips the mount's settings, tool call hooks, and approvals, and takes effect at once. It appears in the mount's change log in the dashboard. It always overwrites, without a version check.

Mounts keep empty folders. A mount holds at most 10,000 files and folders.