Get Reported Messages

Get
/api/v1/moderation.reportsByUsers

Retrieves all the reported messages grouped by users. Permission required: view-moderation-console

Changelog

Version Description
6.2.0 Added
Header parameters
X-User-Id
stringRequired

The user ID.

ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired

The authentication token.

Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Query parameters
oldest
string

It represents the oldest point in time for which you want to retrieve moderation reports.

Example2021-09-30T09:33:15.621Z
latest
string

It represents the oldest point in time for which you want to retrieve moderation reports.

Example2023-08-30T09:33:15.621Z
offset
integer

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.

Example50
count
integer

How many items to return. Refer to the official documentation to learn more.

Example50
sort

List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the official documentation to learn more.

Responses
200

OK

Success Example
{
  "reports": [
    {
      "rooms": [
        {
          "_id": "6423ce62c29657e5b3ba2675rbAXPnMktTFbNpwtJ",
          "t": "d",
          "federated": true
        }
      ],
      "count": 1,
      "message": "hi",
      "msgId": "tDNLALSFk2LET2JZH",
      "ts": "2023-08-30T09:38:38.792Z",
      "username": "test.test",
      "name": "test test",
      "userId": "rbAXPnMktTFbNpwtJ",
      "isUserDeleted": false
    },
    {
      "rooms": [
        {
          "_id": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
          "t": "d"
        }
      ],
      "count": 2,
      "message": "himm",
      "msgId": "xY8cN7yuPQfBgJ9xz",
      "ts": "2023-08-30T09:33:15.621Z",
      "username": "test.test",
      "name": "Testtest",
      "userId": "5fRTXMt7DMJbpPJfh",
      "isUserDeleted": false
    }
  ],
  "count": 2,
  "offset": 0,
  "total": 3,
  "success": true
}
Expand All
object
reports
Array of object
object
rooms
Array of object
object
_id
string
t
string
federated
boolean
count
integer
message
string
msgId
string
ts
string
username
string
name
string
userId
string
isUserDeleted
boolean
count
integer
offset
integer
total
integer
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string