Links

Dismiss Reports

You can dismiss all the reports of a particular user by the userId. You can also dismiss the report of a message by the msgId.
It requires the manage-moderation-actions permission.
URL
Requires Auth
HTTP Method
/api/v1/moderation.dismissReports
yes
POST

Headers

Argument
Example
Required
Description
X-User-Id
myuser-name
Required
The authenticated user ID.
X-Auth-Token
myauth-token
Required
Auth token.

Body Parameter

Argument
Example
Required
Description
userId
5fRTXMt7DMJbpPJfh
Optional, if the msgId is provided.
The id of the user whose reports to dismiss.
msgId
tDNLALSFk2LET2JZH
Optional, if the userId is provided.
The id of the message which reports to dismiss.
It requires either the msgId or userId as a body parameter.

Example Payload

{
"userId":"5fRTXMt7DMJbpPJfh"
}

Example Call

curl --location 'http://localhost:3000/api/v1/moderation.dismissReports' \
--header 'x-auth-token: aEO8Hw3zorBFQtAEYsNPnr67Li9-lY5kX1foen8UiiS' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--data '{
"userId":"5fRTXMt7DMJbpPJfh"
}'

Example Result

Success

{
"success": true
}

Error

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-console permission.
Authorization
No Permission
{
"status": "error",
"message": "You must be logged in to do this."
}
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}

Change Log

Version
Description
6.2.0
Added
Last modified 5mo ago
Rocket.Chat versions receive support for six months after release.