Get User Reports by User ID

Prev Next
Get
/api/v1/moderation.user.reportsByUserId

Get the details of a specific user's reports. Permission required: view-moderation-console

Header parameters
X-User-Id
stringRequired

The user ID.

ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired

The authentication token.

Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Query parameters
userId
stringRequired

Enter the user ID for which you want to retrieve the reports. Make sure that the user ID belongs to the user whose reports you want to retrieve. Entering a user ID with no reports returns the user details, and an incorrect ID returns null results.

ExampleAhgf5k9Ca4YEdMjwX
Responses
200

OK

Example 1
{
  "user": {
    "_id": "J6Q87AnWP5aNc9xhx",
    "createdAt": "2025-02-04T13:02:39.356Z",
    "username": "cat.kate",
    "emails": [
      {
        "address": "testaz@example.com",
        "verified": false
      }
    ],
    "roles": [
      "user",
      "livechat-agent",
      "livechat-monitor"
    ],
    "active": true,
    "name": "cat kate",
    "avatarETag": "pwJbBtoz47Zkf9myK"
  },
  "reports": [
    {
      "_id": "6969ea608de1f4fa0e7f62fa",
      "description": "issue",
      "reportedBy": {
        "_id": "C38WSSzrGd2NCjzqJ",
        "name": "test cat",
        "username": "test.cat",
        "createdAt": null
      },
      "reportedUser": {
        "_id": "J6Q87AnWP5aNc9xhx",
        "createdAt": "2025-02-04T13:02:39.356Z",
        "username": "cat.kate",
        "emails": [
          {
            "address": "testaz@example.com",
            "verified": false
          }
        ],
        "name": "cat kate"
      },
      "ts": "2026-01-16T07:36:00.020Z"
    }
  ],
  "count": 1,
  "total": 1,
  "offset": 0,
  "success": true
}
Expand All
object
user
object
_id
string
createdAt
string
username
string
emails
Array of object
object
address
string
verified
boolean
roles
Array of string
string
active
boolean
name
string
avatarETag
string
reports
Array of object
object
_id
string
description
string
reportedBy
object
_id
string
name
string
username
string
createdAt
string
reportedUser
object
_id
string
createdAt
string
username
string
emails
Array of object
object
address
string
verified
boolean
name
string
ts
string
count
integer
total
integer
offset
integer
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "must have required property 'userId' [invalid-params]",
  "errorType": "invalid-params"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

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