Get User's Reported Messages
    • Dark
      Light
    • PDF

    Get User's Reported Messages

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/moderation.user.reportedMessages

    Retrieve all reported messages of a user. Permission required: view-moderation-console

    Changelog

    VersionDescription
    6.2.0Added
    Header parameters
    X-User-Id
    stringRequired

    The user ID.

    ExampleCkCPNctrgCDfmWLqC
    X-Auth-Token
    stringRequired

    The authentication token.

    Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
    Query parameters
    offset
    integer

    Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.

    Example50
    count
    integer

    How many items to return.

    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}

    userId
    stringRequired

    The id of the user whose reported messages should be retrieved.

    Responses
    200

    OK

    Success Example
    {
      "user": {
        "_id": "5fRTXMt7DMJbpPJfh",
        "username": "test.test",
        "name": "Testtest"
      },
      "messages": [
        {
          "_id": "64ef0f992c26843a68c1f785",
          "message": {
            "_id": "EbhcT4vjrCDyZuHKq",
            "rid": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
            "msg": "hola",
            "ts": "2023-08-30T09:44:30.805Z",
            "u": {
              "_id": "5fRTXMt7DMJbpPJfh",
              "username": "test.test",
              "name": "Testtest"
            },
            "_updatedAt": "2023-08-30T09:44:30.968Z",
            "urls": [],
            "mentions": [],
            "channels": [],
            "md": [
              {
                "type": "PARAGRAPH",
                "value": [
                  {
                    "type": "PLAIN_TEXT",
                    "value": "hola"
                  }
                ]
              }
            ]
          },
          "room": {
            "_id": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
            "t": "d"
          },
          "ts": "2023-08-30T09:44:57.912Z"
        },
        {
          "_id": "64ef0cdb2c26843a68c1f780",
          "message": {
            "_id": "xY8cN7yuPQfBgJ9xz",
            "rid": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
            "msg": "himm",
            "ts": "2023-07-11T01:37:07.951Z",
            "u": {
              "_id": "5fRTXMt7DMJbpPJfh",
              "username": "test.test",
              "name": "Testtest"
            },
            "_updatedAt": "2023-07-11T01:37:08.024Z",
            "urls": [],
            "mentions": [],
            "channels": [],
            "md": [
              {
                "type": "PARAGRAPH",
                "value": [
                  {
                    "type": "PLAIN_TEXT",
                    "value": "himm"
                  }
                ]
              }
            ]
          },
          "room": {
            "_id": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
            "t": "d"
          },
          "ts": "2023-08-30T09:33:15.621Z"
        }
      ],
      "count": 2,
      "total": 2,
      "offset": 0,
      "success": true
    }
    Expand All
    object
    user
    object
    _id
    string
    username
    string
    name
    string
    messages
    Array of object
    object
    _id
    string
    message
    object
    _id
    string
    rid
    string
    msg
    string
    ts
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    _updatedAt
    string
    urls
    Array of object
    object
    mentions
    Array of object
    object
    channels
    Array of object
    object
    md
    Array of object
    object
    type
    string
    value
    Array of object
    object
    type
    string
    value
    string
    room
    object
    _id
    string
    t
    string
    ts
    string
    count
    integer
    total
    integer
    offset
    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

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.