Delete all user posts

/services/v2/user/{user-id}/deleteAllPosts.json

The purpose of this API is to allow for the bulk deletion of all content published (and held in moderation) for a particular user. This parallels the capability for moderators to bulk delete all content for a given user from the moderation queues or from the user's profile page.

🚧

Permissions & Notes:

  • The user making this call must have the "delete any permission" for the content, so it is assumed that a moderator will be making this call. Delete any question, Delete any answer, Delete any comment, Delete any question/answer/comment. As of this release, no discrete delete permissions are present for ideas and articles, so they will be governed by the above permissions.

This functionality was added in the 2.21.0 Release

Sample Request

https://apidocs.cloud.answerhub.com/services/v2/user/233/deleteAllPosts.json"
Here the userID (233) would specify the user to target.

-u answerhub:test123
-H "Accept: application/json"
-H "Content-type: application/json"
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/user/233/deleteAllPosts.json"

Sample Response

HTTP Error Response codes:

Success Response:

  • 200: Message: User: {0} has all content deleted.

Error Responses:

  • 403: Permission issue

Message: User does not have permission to delete user content

  • 404: User not found - specified user is not in the system. (Either a userid has been specified above the highest user registration number or GDPR has been previously used to delete the user)
Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!