> ## 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's Reported Messages

> Retrieve all reported messages of a user.
Permission required: `view-moderation-console`
### Changelog
| Version      | Description |
| ---------------- | ------------|
|6.2.0            | Added       |

## OpenAPI

````json GET /api/v1/moderation.user.reportedMessages
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Settings"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/moderation.user.reportedMessages": {
      "parameters": [],
      "get": {
        "summary": "Get User's Reported Messages",
        "operationId": "get-api-v1-moderation.user.reportedMessages",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "type": "string"
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "type": "string"
                              },
                              "rid": {
                                "type": "string"
                              },
                              "msg": {
                                "type": "string"
                              },
                              "ts": {
                                "type": "string"
                              },
                              "u": {
                                "type": "object",
                                "properties": {
                                  "_id": {
                                    "type": "string"
                                  },
                                  "username": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              },
                              "_updatedAt": {
                                "type": "string"
                              },
                              "urls": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {}
                                }
                              },
                              "mentions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {}
                                }
                              },
                              "channels": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {}
                                }
                              },
                              "md": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "room": {
                            "type": "object",
                            "properties": {
                              "_id": {
                                "type": "string"
                              },
                              "t": {
                                "type": "string"
                              }
                            }
                          },
                          "ts": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Success Example": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "description": "Retrieve all reported messages of a user.\nPermission required: `view-moderation-console`\n### Changelog\n| Version      | Description |\n| ---------------- | ------------|\n|6.2.0            | Added       |",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-User-Id"
          },
          {
            "$ref": "#/components/parameters/X-Auth-Token"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/count"
          },
          {
            "$ref": "#/components/parameters/sort"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "The id of the user whose reported messages should be retrieved.",
            "name": "userId",
            "required": "true"
          }
        ],
        "tags": [
          "Moderation"
        ]
      }
    }
  },
  "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."
                }
              }
            }
          }
        }
      },
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Permission Error": {
                "value": {
                  "success": "false",
                  "error": "User does not have the permissions required for this action [error-unauthorized]"
                }
              }
            }
          }
        }
      }
    },
    "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."
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "required": "false",
        "schema": {
          "type": "integer"
        },
        "example": "50",
        "description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "count": {
        "name": "count",
        "in": "query",
        "required": "false",
        "schema": {
          "type": "integer"
        },
        "example": "50",
        "description": "How many items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "required": "false",
        "schema": {},
        "description": "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](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
      }
    }
  }
}
````

