# להשהות משתמש דרך ה-API

**URL:** https://meta.discourse.org/t/suspend-a-user-via-the-api/36810
**Category:** Developers
**Tags:** rest-api, how-to
**Created:** [16 בדצמבר,‏ 2015,‏ 11:38pm UTC](https://meta.discourse.org/t/suspend-a-user-via-the-api/36810 "2015-12-16T23:38:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![SylvainKalache](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sylvainkalache/32/116954_2.png) [@SylvainKalache](https://meta.discourse.org/u/SylvainKalache)
#### Post date: [16 בדצמבר,‏ 2015,‏ 11:38pm UTC](https://meta.discourse.org/t/suspend-a-user-via-the-api/36810/1 "2015-12-16T23:38:23Z")

</div>

If you use Discourse web interface, you can go to the route `/admin/users/:username` and then use the `suspend` button. You can find the `suspend` method in `UsersController`.

To suspend a user via the API, use `/admin/users/:user_id/suspend`

See the API docs for additional details about this route: [https://docs.discourse.org/#tag/Admin/operation/suspendUser](https://docs.discourse.org/#tag/Admin/operation/suspendUser)
