Skip to content
Update integration configuration

Update integration configuration

Activate an integration, choose its authentication mode, assign Worlds, or update tool defaults.

PATCH/api/v1/integrations/:integration/configuration

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/integrations/notion/configuration", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "enabled": true,
  "worldIds": [
    "01995e56-e2d4-7f19-b691-7bf9af6abdc8"
  ],
  "toolPolicies": [
    {
      "toolName": "search",
      "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.

Request body#

enabledboolean

Workspace activation. Omitting it preserves activation.

authSchemestring

oauth2 or api_key, from the supported authSchemes. Omitting it preserves the selected scheme.

worldIdsUUID[]

Complete replacement of assigned Worlds. Omit to preserve assignments; [] removes them all. Duplicate IDs are rejected.

toolPoliciesobject[]

Atomic tool-default updates, up to 256 entries. Each entry has toolName and policy (allow, ask, or deny). Omitted tools keep their defaults; [] changes none.

Responses#

Returns workspace configuration, assigned worldIds, supported authentication schemes, tool catalog and defaults, optional runtime capabilities, and setup state. Lists are not paginated. World IDs represent assignment, even while workspace activation is off. The existing GET /integrations connection catalog keeps its original response.

200 response
{
  "integration": "notion",
  "name": "Notion",
  "description": "Connect Notion workspaces.",
  "enabled": true,
  "configured": true,
  "hasBeenActivated": true,
  "kind": "connected",
  "removable": true,
  "authScheme": "oauth2",
  "authSchemes": [
    "oauth2"
  ],
  "worldIds": [
    "01995e56-e2d4-7f19-b691-7bf9af6abdc8"
  ],
  "tools": [],
  "defaultPolicies": [],
  "setupMessage": null,
  "requiresSetup": true,
  "toolAvailabilityNote": null
}
More about this endpoint

Activation, authentication mode, World assignment, and the tool-default batch are saved in one transaction. A rejected field or unknown World saves nothing.

Workspace activation and World assignment are separate: enabling the workspace alone does not assign a World. Disabling an integration prevents its tools from running.

Always-enabled integrations cannot be turned off or assigned to a replacement World list. They remain active on every World.

deny hides a tool and prevents lower-level overrides from making it available. ask requires approval. allow permits execution.

The selected authentication scheme follows the same setup and transition rules as the dashboard. Existing connected accounts retain their credentials.