---
title: "Deactivate a user"
method: POST
path: "/users/{user_id}/deactivate"
tags: ["User"]
---

# Deactivate a user

`POST /users/{user_id}/deactivate`

Deactivate a user so they can no longer authenticate; you cannot deactivate yourself.

## Path parameters

- `user_id` integer, required — ID of the user to deactivate.

## Query parameters

- `cookie_name` string, nullable
- `tenant_id` integer

## Response `200`

Successful Response

- UserOut
  - `id` integer, required — Unique identifier of the user.
  - `created_at` string, date-time, required — UTC timestamp when the user was created.
  - `email` string, email, required — Current confirmed email address.
  - `email_confirmed` boolean, required — Whether the email address has been confirmed.
  - `pending_email` string, nullable — New email awaiting confirmation, or null if none pending.
  - `name` string, nullable — Full display name, if set.
  - `first_name` string, nullable — User's given name.
  - `last_name` string, nullable — User's family name.
  - `admin` boolean, required — Whether the user has tenant administrator privileges.
  - `superadmin` boolean, nullable — Whether the user is a platform operator.
  - `active` boolean, required — Whether the account is active and can authenticate.
  - `tenant_id` integer, nullable — Identifier of the tenant the user belongs to.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — Administrator privileges required for the user's tenant.
- `404` — No user exists with the given id.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
