PATCH /api/roles//deactivate
Deactivates a role, preventing it from being assigned to new users. Users who currently have this role will lose access to its associated permissions.Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.Path Parameters
The unique identifier of the role to deactivate
Response
This endpoint returns204 No Content on success with an empty response body.
Error Responses
- 404 Not Found: Role with the specified ID does not exist
- 500 Internal Server Error: Unexpected server error
Example Request
Example Success Response
Example Error Response
Usage Notes
- Deactivating a role that is already inactive has no effect
- After deactivation, the role’s status will be set to
INACTIVE - Users with this role will immediately lose access to its associated permissions
- The role cannot be assigned to users while it is inactive
- This action is logged in the audit trail with action type
DESACTIVAR_ROL - Consider the impact on existing users before deactivating a role