Update a custom integration
Edit fields of a custom integration. Omitted fields retain their current values.
/api/v1/custom-integrations/:keyconst 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#
keystringrequiredThe saved integration's command key, URL-encoded.
Request body#
namestringNon-empty display name, at most 60 characters.
descriptionstringDescription, at most 500 characters. Defaults to an empty string.
endpointUrlstringPublic HTTPS endpoint. Local development also accepts loopback HTTP; URLs cannot contain credentials or fragments.
timeoutMsintegerCall timeout from 1000 to 60000 milliseconds; defaults to 30000.
headersobjectUp 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.
toolsarrayUp 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.
{
"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.