Skip to content
Set a workspace tool default

Set a workspace tool default

Set a tool’s default policy for your workspace.

PUT/api/v1/tool-policies/:integration/:toolName

Request#

TypeScript
const 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#

integrationstringrequired

An integration key from GET /integrations or /integration-configurations.

toolNamestringrequired

The integration’s tool name, URL-encoded; 1–128 characters.

Request body#

policystringrequired

allow, ask, or deny. Workspace defaults cannot inherit.

Responses#

Returns integration, toolName, and the saved workspace policy.

200 response
{
  "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.