---
title: "Deactivate a user"
method: DELETE
path: "/api/users/{user_id}"
tags: ["Users - Admin"]
---

# Deactivate a user

`DELETE /api/users/{user_id}`

Deactivates a user (soft delete).
The user will no longer appear in listings but their data is preserved.

Refuses with 409 when the deactivation would leave the company with no
ACTIVE user able to reach access management (`SELF_LOCKOUT_MODULES`) — see
`user_roles_db.deactivate_user_with_lockout_guard`, which owns that
invariant inside the write transaction.

## Path parameters

- `user_id` integer, required

## Headers

- `x-api-token` string, nullable

## Response `204`

Successful Response

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
