Set a group override
Set one tool's policy for every call in a group's sessions.
/api/v1/groups/:groupId/tool-policies/:integration/:toolNameconst response = await fetch("https://api.smallworld.sh/api/v1/groups/team_42/tool-policies/github/issue_write", {
method: "PUT",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({
"policy": "ask"
}),
});
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.
integrationstringrequiredAn integration key from GET /integrations, such as github or notion.
toolNamestringrequiredThe integration's own tool name, as toolName in GET /tool-policies and in tool calls. URL-encode it.
Request body#
policystringrequiredallow runs the tool without asking, ask waits for an approval, and deny hides the tool from agents. To remove the override, use DELETE.
Responses#
Returns integration, toolName, policy (the setting at this level: allow, ask, deny, or inherit when there is no override), effectivePolicy (allow, ask, or deny), and source: integration_default, world_override, group_override, user_override, workspace_hidden, group_hidden, or disabled. hiddenInWorlds lists the Worlds that hide the tool, where the override doesn't apply.
{
"integration": "github",
"toolName": "issue_write",
"policy": "ask",
"effectivePolicy": "ask",
"source": "group_override",
"hiddenInWorlds": []
}
More about this endpoint
The override applies to the next tool calls in the group's sessions, in every World. It never shows a tool the workspace or a World hides, or an integration that is turned off.
The override replaces a member's own: allow runs the tool without approval also for a member whose own override is ask or deny, ask requires approval also after a remembered Allow, and deny hides the tool.
Group overrides apply to every call in the group's sessions: on the group's connection, on a member's own account, and for tools without a connection, such as built-in and custom tools. They replace the member's own override while they are set. Sessions of another group, and groupless sessions, don't use them. They can also be edited in the dashboard.