---
title: "Delete a User based on the specified User ID"
method: DELETE
path: "/users/{user_id}"
tags: ["users"]
---

# Delete a User based on the specified User ID

`DELETE /users/{user_id}`

You need `tenants.user.delete` permission to access resource
* SSH keys
* User's object itself
* all Workspaces and Contracts, where the User is **the only member**

These data objects are deleted automatically (e.g. due to expiration), so they won't be deleted right after User deletion:
* Flows activity records (used in order to show runlog)
* Logs of flow execution and repo build
* Invitations to the Team, Contract and Workspace
* Notifications
* If this User is a member of any Contract, which has one more Owner beside them then User's Teams and Repos will be transferred to the next Owner.
* If this User is a member of any Workspace, which has one more Owner beside them then User's Flows and Credentials will be transferred to the next Owner.
* If this User is the last Owner of any Workspace then given Workspace will be deleted with all data.
* If this User is the only member of Contract(s) then they will be deleted along with Contract and all the unique data connected with this User.

## Path parameters

- `user_id` string, required

## Response `204`

No Content

- object

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
