Skip to content
Update a custom integration

Update a custom integration

Edit fields of a custom integration. Omitted fields retain their current values.

PATCH/api/v1/custom-integrations/:key

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/custom-integrations/example", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "timeoutMs": 10000,
  "tools": [
    {
      "name": "lookup",
      "description": "Look up a record",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      }
    }
  ]
}),
});
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#

keystringrequired

The saved integration's command key, URL-encoded.

Request body#

namestring

Non-empty display name, at most 60 characters.

descriptionstring

Description, at most 500 characters. Defaults to an empty string.

endpointUrlstring

Public HTTPS endpoint. Local development also accepts loopback HTTP; URLs cannot contain credentials or fragments.

timeoutMsinteger

Call timeout from 1000 to 60000 milliseconds; defaults to 30000.

headersobject

Up to 10 static headers. Values are write-only. Omit during updates to retain them; use an empty object to clear them. Routing, signing, and other reserved headers are rejected.

toolsarray

Up to 100 OpenAI, Anthropic, or MCP tool definitions, each at most 64 KiB.

Responses#

Returns the configuration, original tool definitions, generated command names, enablement, and timestamps. Static header values and the saved signing secret are never readable; headerNames lists names only.

200 response
{
  "key": "example",
  "name": "Example",
  "description": "Record lookup",
  "endpointUrl": "https://tools.example.com/tools",
  "timeoutMs": 10000,
  "headerNames": [
    "x-api-key"
  ],
  "enabled": true,
  "tools": [
    {
      "name": "lookup",
      "description": "Look up a record",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      }
    }
  ],
  "commands": [
    {
      "name": "lookup",
      "command": "lookup",
      "mode": "unknown"
    }
  ],
  "createdAt": "2026-10-22T10:00:00.000Z",
  "updatedAt": "2026-10-22T10:00:00.000Z"
}
More about this endpoint

Use integration and World configuration endpoints for enablement/policies. Removing tools also removes their workspace, World, group, and user policies. Definition edits invalidate pending approvals as before.