# How deactivate a user temporary using api

**URL:** <https://forum.mattermost.com/t/how-deactivate-a-user-temporary-using-api/16207>\
**Category:** Troubleshooting\
**Created:** [June 15, 2023, 10:15am UTC](https://forum.mattermost.com/t/how-deactivate-a-user-temporary-using-api/16207 "2023-06-15T10:15:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrvn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/mrvn/32/6945_2.png) [@mrvn](https://forum.mattermost.com/u/mrvn)\
**Post date:** [June 15, 2023, 10:15am UTC](https://forum.mattermost.com/t/how-deactivate-a-user-temporary-using-api/16207/1 "2023-06-15T10:15:32Z")

</div>

Hey there, I’ve been looking for an answer but I didn’t find anything related.

I want to deactivate a user temporary so the user is not able to login until I reactivate the account. Using the deactivate method seems not to have any type of reactivate options, even without the permanent flag

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [June 16, 2023, 4:02am UTC](https://forum.mattermost.com/t/how-deactivate-a-user-temporary-using-api/16207/2 "2023-06-16T04:02:22Z")

</div>

Hi @mrvn and welcome to the Mattermost forums!

To reactivate a user, you would use the [UpdateUserActive](https://api.mattermost.com/#tag/users/operation/UpdateUserActive) API call, at least that’s what `mmctl` does with its `user activate` command line option.
