---
title: "Deactivates the user with the specified id."
method: POST
path: "/users/{userId}/deactivate"
tags: ["users"]
---

# Deactivates the user with the specified id.

`POST /users/{userId}/deactivate`

A deactivated user can no longer sign in.
            This is only possible if the user is not the last admin user.

<Check title="Required Permissions" icon="key">The user must be an admin or have `user-manage-config:write` permissions.</Check>

## Path parameters

- `userId` string, uuid, required

## Query parameters

- `includeSummary` boolean

## Headers

- `Authorization` string, required

## Response `200`

OK

- PostUserDeactivateByUserIdResponse
  - `privateProjectManagersReassignedCount` integer
  - `privateProjectsDeletedCount` integer

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
