Disconnect an integration
Disconnect a represented user's own account from an integration.
/api/v1/users/:userId/connections/:integrationconst response = await fetch("https://api.smallworld.sh/api/v1/users/customer_123/connections/github", {
method: "DELETE",
headers: { Authorization: `Bearer ${apiKey}` },
});
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#
userIdstringrequiredYour application's user ID, URL-encoded. At most 512 characters, with no surrounding whitespace or null bytes. Encode the IDs
.and..as%2Eand%2E%2E: curl sends these as written, but JavaScript'sfetchremoves them even when encoded.integrationstringrequiredAn integration key from GET /integrations, such as github or notion.
Responses#
Returns deleted: true. Disconnecting a known user without an account of their own also succeeds and changes nothing, including a user who only uses a group's connection.
{
"deleted": true
}
More about this endpoint
Disconnecting cancels this user's in-flight connect sessions for the integration and prevents subsequent tool calls using the old connection.
Only the user's own account is removed. In a session whose group has a connection to the integration, the user's next calls use that connection. Remove a group's connection with DELETE /groups/:groupId/connections/:integration.
The represented user, their persistent terminal sessions, and tool-call history remain.