---
title: "Delete a user"
method: DELETE
path: "/admin/users/{userId}"
tags: ["Admin"]
---

# Delete a user

`DELETE /admin/users/{userId}`

## Request

- Base URL: `https://cloud.kaneo.app/api`
- URL: `https://cloud.kaneo.app/api/admin/users/{userId}`
- Auth: HTTP bearer

Permanently delete a user's account, the same way they could themselves: workspaces where they are the only member are deleted, and they leave the others. Fails while they are the only owner of a workspace with other members. Requires the `users:delete` instance permission; API keys are rejected.

## Path parameters

- `userId` string, required

## Response `200`

The deleted user

- AdminDeletedUser
  - `id` string, required

## Other responses

- `400`: You can't delete yourself or the last administrator
- `401`: Missing or invalid credentials
- `403`: The caller lacks the instance permission, the user has permissions the caller lacks, or the request used an API key
- `404`: User not found
- `409`: The user is the only owner of a shared workspace, or one of their workspaces has an active subscription
- `429`: The API key exceeded its rate limit or usage quota. Wait the number of seconds in Retry-After before retrying. The X-RateLimit headers are sent only when the rate limit was hit.

## Changes

- **2026-10-27** `8f3ec578c70a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/admin/users/:userId/delete.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) - [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usekaneo/apis/kaneo-api/revisions/741a49dfb347?raw)
