Skip to content
Delete a user

Delete a user

Delete a represented user and their associated data.

DELETE/api/v1/users/:id

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/users/customer_123", {
  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#

idstringrequired

Your application's user ID, URL-encoded. At most 512 characters, with no surrounding whitespace or null bytes. Encode the IDs . and .. as %2E and %2E%2E: curl sends these as written, but JavaScript's fetch removes them even when encoded.

Responses#

Returns deleted: true after deletion succeeds.

200 response
{
  "deleted": true
}
More about this endpoint

Deletion also removes the user's sessions, files, executions, tool-call history, own connections, connect sessions, user policy overrides, group memberships, and user mounts with their files. Their groups, with the groups' connections and mounts, stay.

A user with a running session cannot be deleted. The Playground's test user is protected.

This is permanent. A later execution with the same external ID can create a new user but cannot recover the deleted state.