Rename a custom command
Move a custom integration and its configuration to a new command key.
POST
/api/v1/custom-integrations/:key/renameconst response = await fetch("https://api.smallworld.sh/api/v1/custom-integrations/example/rename", {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({
"key": "records"
}),
});
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#
keystringrequiredThe new command key.
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": "records",
"name": "Example",
"description": "Record lookup",
"endpointUrl": "https://tools.example.com/tools",
"timeoutMs": 30000,
"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
The key moves with workspace/World/group/user policies and hooks. Existing tool-call history retains the original key.