Skip to content
Update a mount

Update a mount

Change a mount's path, scope, target, description, or settings. Its files stay.

PATCH/api/v1/mounts/:mountId

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/mounts/0199a1c4-5b6e-7a10-9c2d-3e4f5a6b7c8d", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "settings": {
    "update": "allow"
  }
}),
});
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.

Request body#

pathstring

A new path inside /workspace, with the same rules as when creating a mount.

scopestring

A new scope: global, group, or user. Send it whenever you change the scope or target, with groupId for a group mount or userId for a user mount.

groupIdstring

Your application's group ID. Required for a group mount, and only allowed for one. The group must already exist.

userIdstring

Your application's user ID. Required for a user mount, and only allowed for one. The user must already exist.

descriptionstring | null

A new description, at most 2000 characters. null or an empty string removes it.

settingsobject

How agents' changes to the mount are handled: create, update, delete, move, and rename, each allow, ask, or deny. Reads are always allowed. Only the settings you send change.

Responses#

Returns id, path, scope (global, group, or user), groupId (your group ID, for a group mount), userId (your user ID, for a user mount), nullable description, settings with create, update, delete, move, and rename (each allow, ask, or deny), fileCount (files, not folders), totalBytes, and ISO 8601 createdAt and updatedAt timestamps. groupId and userId are null when they don't apply.

200 response
{
  "id": "0199a1c4-5b6e-7a10-9c2d-3e4f5a6b7c8d",
  "path": "/workspace/docs",
  "scope": "group",
  "groupId": "team_42",
  "userId": null,
  "description": "Product documentation. Answers to customer questions go in faq.md.",
  "settings": {
    "create": "allow",
    "update": "allow",
    "delete": "ask",
    "move": "ask",
    "rename": "ask"
  },
  "fileCount": 2,
  "totalBytes": 91,
  "createdAt": "2026-10-10T12:00:00.000Z",
  "updatedAt": "2026-10-10T12:00:01.000Z"
}
More about this endpoint

Send any of path, scope, groupId, userId, description, and settings. To change the scope or target, send scope with its groupId or userId, such as { "scope": "group", "groupId": "team_42" } to turn a user mount into a group mount. groupId or userId without scope is invalid.

A new path, scope, or target is checked for conflicts again, as when creating a mount, and returns 409 when it overlaps another mount of the same scope and target.

Any edit, even of the description, discards the mount's changes from commands that are still running or waiting for approval: a waiting approval is interrupted, and the command's stderr says why. Commands that start afterwards use the new configuration.