Skip to content
Remove a user override

Remove a user override

Remove a user's override, such as a remembered Allow, so the tool follows the World or workspace policy again.

DELETE/api/v1/users/:userId/tool-policies/:integration/:toolName

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/users/customer_123/tool-policies/acme/get_order", {
  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#

userIdstringrequired

Your application's user ID, URL-encoded. At most 512 characters, with no surrounding whitespace or null bytes. Encode the IDs . and .. as %2E and %2E%2E: curl sends these as written, but JavaScript's fetch removes them even when encoded.

integrationstringrequired

An integration key from GET /integrations, such as github or notion.

toolNamestringrequired

The integration's own tool name, as toolName in GET /tool-policies and in tool calls. URL-encode it.

Query parameters#

groupIdstring

Your application's group ID: which of the user's groups the result is for. Omit it for a user with no group or one group. Required when the user belongs to several groups. URL-encode it.

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. policy is inherit after removal.

200 response
{
  "integration": "acme",
  "toolName": "get_order",
  "policy": "inherit",
  "effectivePolicy": "ask",
  "source": "integration_default",
  "hiddenInWorlds": []
}
More about this endpoint

The next call follows the World or workspace policy, so an Ask policy asks again.

Removing an override that doesn't exist also succeeds, so a retry is safe.

groupId follows the rules of a new session in POST /worlds/:worldId/execute. Without it, a user with no groups is read without a group and a user with one group is read for that group. A user in several groups needs groupId. It chooses the group that the response's effectivePolicy and source are resolved for. When it fails, nothing is removed.