Skip to content
Set a World’s integration gate

Set a World’s integration gate

Assign or disable an integration in a World.

PUT/api/v1/worlds/:worldId/integrations/:integration

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/worlds/01995e56-e2d4-7f19-b691-7bf9af6abdc8/integrations/notion", {
  method: "PUT",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "enabled": true
}),
});
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#

worldIdUUIDrequired

The World ID returned by POST /worlds or GET /worlds.

integrationstringrequired

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

Request body#

enabledbooleanrequired

true assigns this integration to the World; false explicitly disables it.

Responses#

Returns the updated World integration configuration.

200 response
{
  "worldId": "01995e56-e2d4-7f19-b691-7bf9af6abdc8",
  "integration": "notion",
  "enabled": true,
  "alwaysEnabled": false,
  "toolPolicies": []
}
More about this endpoint

The workspace must also enable the integration for its tools to run. Always-enabled integrations reject gate changes.