PATCH /api/users//deactivate
Deactivates a user account, preventing them from accessing the system. This endpoint requires write privileges or admin role.Authentication
This endpoint requires JWT authentication with one of the following:WRITE_PRIVILEGESauthorityADMINrole
Path Parameters
The unique identifier of the user to deactivate
Response
This endpoint returns no content on success (HTTP 204).Error Codes
204- User deactivated successfully (no content returned)401- Unauthorized: Missing or invalid JWT token403- Forbidden: Insufficient permissions404- Not Found: User does not exist
Example Request
Example Success Response
Example Error Response
Notes
- This operation changes the user’s status to
INACTIVO - Once deactivated, the user will not be able to authenticate or access the system
- Deactivating a user does not delete their data; it can be reversed using the activate endpoint
- This action is logged in the audit log with module “USUARIOS” and action “DESACTIVAR_USUARIO”