> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Reports by User ID

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

## OpenAPI

````json GET /api/v1/moderation.user.reportsByUserId
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Settings"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/moderation.user.reportsByUserId": {
      "get": {
        "summary": "Get User Reports by User ID",
        "tags": [
          "Moderation"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "emails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string"
                              },
                              "verified": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string"
                        },
                        "avatarETag": {
                          "type": "string"
                        }
                      }
                    },
                    "reports": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "reportedBy": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "username": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string"
                              }
                            }
                          },
                          "reportedUser": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string"
                              },
                              "username": {
                                "type": "string"
                              },
                              "emails": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "address": {
                                      "type": "string"
                                    },
                                    "verified": {
                                      "type": "boolean"
                                    }
                                  }
                                }
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          },
                          "ts": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "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.02Z"
                        }
                      ],
                      "count": "1",
                      "total": "1",
                      "offset": "0",
                      "success": "true"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "errorType": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "success": "false",
                      "error": "must have required property 'userId' [invalid-params]",
                      "errorType": "invalid-params"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          }
        },
        "operationId": "get-api-v1-moderation.user.reportsByUserId",
        "description": "Get the details of a specific user's reports. Permission required: `view-moderation-console`",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-User-Id"
          },
          {
            "$ref": "#/components/parameters/X-Auth-Token"
          },
          {
            "schema": {
              "type": "string",
              "example": "Ahgf5k9Ca4YEdMjwX"
            },
            "in": "query",
            "name": "userId",
            "description": "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.",
            "required": "true"
          }
        ]
      }
    }
  },
  "components": {
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "X-User-Id": {
        "name": "X-User-Id",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "CkCPNctrgCDfmWLqC",
        "description": "The user ID."
      },
      "X-Auth-Token": {
        "name": "X-Auth-Token",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE",
        "description": "The authentication token."
      }
    }
  }
}
````

