Suspend a User

You can use this API request to suspend a user from accessing or interacting with your AnswerHub site, if you would like to "warn" a user for misconduct within the community.

/services/v2/user/[userId]/suspendUser.json

You can use the following parameters in your suspend a user request:

Specific: reason
Paging and Sorting: page, pageSize, sort
Projection: include, exclude
Other options: wrap

🚧

Permissions & Notes:

  • You must have the Suspend user permission under Moderation Roles in the Advanced Editor.

  • According to site-specific policies, a user who has sufficient permissions may temporarily, or permanently, ban another user who violates the terms & agreements of that site.

  • We added this request in version 1.6.3.

Sample Request

A PUT suspend a user request to suspend a user (userId:111) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/user/111/suspendUser.json" -v

In the example above, we suspended suspendabletestuser (user 111), until a moderator manually unsuspends the user. The user will not receive a notification, they will just not be able to log in to the community anymore.

Expected Response

Successful Response:

  • HTTP Status 200 - OK
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!