Set a workspace tool default
Set a tool’s default policy for your workspace.
PUT
/api/v1/tool-policies/:integration/:toolNameconst response = await fetch("https://api.smallworld.sh/api/v1/tool-policies/notion/search", {
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#
integrationstringrequiredAn integration key from GET /integrations or /integration-configurations.
toolNamestringrequiredThe integration’s tool name, URL-encoded; 1–128 characters.
Request body#
policystringrequiredallow, ask, or deny. Workspace defaults cannot inherit.
Responses#
Returns integration, toolName, and the saved workspace policy.
{
"integration": "notion",
"toolName": "search",
"policy": "ask"
}
More about this endpoint
For atomic batches together with activation and World assignment, PATCH /integrations/:integration/configuration with toolPolicies.
deny is the workspace Hidden policy and cannot be overridden by a World, group, or user.