Delete all the reports of messages that belongs to user.
{% hint style="info" %}
It requires the manage-moderation-actions permission.
{% endhint %}
| URL | Requires Auth | HTTP Method |
|---|---|---|
/api/v1/moderation.user.deleteReportedMessages |
yes |
POST |
| Argument | Example | Required | Description |
|---|---|---|---|
X-User-Id |
myuser-name |
Required | The authenticated user ID. |
X-Auth-Token |
myauth-token |
Required | Auth token. |
| Argument | Example | Required | Description |
|---|---|---|---|
userId |
5fRTXMt7DMJbpPJfh |
Required | The id of the user whose reports to delete |
{
"userId":"5fRTXMt7DMJbpPJfh"
}curl --location 'https://writing-demo.dev.rocket.chat/api/v1/moderation.user.deleteReportedMessages' \
--header 'x-auth-token: aEO8Hw3zorBFQtAEYsNPnr67Li9-lY5kX1foen8UiiS' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--data '{
"userId":"rbAXPnMktTFbNpwtJ"
}'
{
"success": true
}Any of the following errors can occur on the endpoint.
- Authorization: Requires an authentication token for the request to be made.
- No Permission: Occurs when the authenticated user doesn't have the
view-moderation-consolepermission.
{% tabs %} {% tab title="Authorization" %}
{
"status": "error",
"message": "You must be logged in to do this."
}{% endtab %}
{% tab title="No Permission" %}
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}{% endtab %} {% endtabs %}
| Version | Description |
|---|---|
| 6.2.0 | Added |