Suspend a user via the API

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

9 Likes