Delete a group
Delete a group with its memberships, connections, tool overrides, and mounts. Its members stay and keep their other groups.
/api/v1/groups/:groupIdconst response = await fetch("https://api.smallworld.sh/api/v1/groups/team_42", {
method: "DELETE",
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#
groupIdstringrequiredYour application's group ID, URL-encoded. At most 512 characters, with no surrounding whitespace or null bytes.
Responses#
Returns deleted: true after deletion succeeds.
{
"deleted": true
}
More about this endpoint
The group's memberships, connections, pending connect sessions, tool overrides, and mounts with their files are deleted with it. Smallworld's stored credentials for the group are removed.
Members stay, with their other groups, their own connections, and their history.
Sessions that acted for the group are closed for good, with closedReason group_deleted. A running command is stopped at once and ends interrupted with errorCode session_closed. A command waiting for approval ends the same way, and its pending tool call ends interrupted with errorCode session_closed. Further commands in these sessions return session_closed. Their executions, tool calls, and outputs stay readable, and session.groupId keeps the group's ID. Members' sessions for other groups are unaffected.
Tool calls made in the group's sessions keep the group's ID and name in history.
This is permanent. Creating a group with the same ID later starts a new, empty group. The Playground Group can't be deleted.