> ## 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 Group Messages > Lists all the messages in a private channel. ### Changelog | Version | Description | | ------- | ----------- | | 7.0.0 | Added `mentionIds`, `starredIds`, `pinned` query parameters.| | 0.59.0 | Added | ## OpenAPI ````json GET /api/v1/groups.messages { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/groups.messages": { "get": { "tags": [ "Groups" ], "summary": "Get Group Messages", "description": "Lists all the messages in a private channel. \n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 7.0.0 | Added `mentionIds`, `starredIds`, `pinned` query parameters.|\n| 0.59.0 | Added |", "operationId": "get-api-v1-groups.messages", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" }, { "$ref": "#/components/parameters/Optional-RoomId" }, { "$ref": "#/components/parameters/Optional-RoomName" }, { "$ref": "#/components/parameters/fields" }, { "$ref": "#/components/parameters/sort" }, { "$ref": "#/components/parameters/offset" }, { "$ref": "#/components/parameters/count" }, { "name": "mentionIds", "in": "query", "description": "Filter the messages where a user has been mentioned by the userId. For a set of userIds, use an array (`[\"838ndhd79w\", \"dud0wu900\"]`).", "schema": { "type": "string" }, "example": "dud0wu900" }, { "name": "starredIds", "in": "query", "description": "Filter the messages a user have starred by userId. For a set of userIds, use an array (`[\"838ndhd79w\", \"dud0wu900\"]`).", "schema": { "type": "string" }, "example": "dud0wu900" }, { "name": "pinned", "in": "query", "description": "Filter pinned messages.", "schema": { "type": "boolean" }, "example": "true" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "items": { "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" }, "reactions": { "type": "object", "properties": { ":frowning2:": { "type": "object", "properties": { "usernames": { "type": "array", "items": { "type": "string" } } } } } }, "mentions": { "type": "array", "items": { "type": "object" } }, "channels": { "type": "array", "items": { "type": "object" } }, "starred": { "type": "object", "properties": { "_id": { "type": "string" } } }, "t": { "type": "string" }, "groupable": { "type": "boolean" }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } } } } }, "count": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" }, "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "messages": [ { "_id": "CeXwh5eBbdrtvnqG6", "rid": "agh2Sucgb54RQ8dDo", "msg": "s", "ts": "2018-10-05T13:48:21.616Z", "u": { "_id": "KPkEYwKKBKZnEEPpt", "username": "marc.pow", "name": "Marc Pow" }, "_updatedAt": "2018-10-05T13:48:49.535Z", "reactions": { ":frowning2:": { "usernames": [ "marcos.defendi" ] } }, "mentions": [], "channels": [], "starred": { "_id": "KPkEYwKKBKZnEEPpt" } }, { "_id": "MrAeupRiF9TvhMesK", "t": "room_changed_privacy", "rid": "agh2Sucgb54RQ8dDo", "ts": "2018-10-05T00:11:16.998Z", "msg": "Private Group", "u": { "_id": "rocketchat.internal.admin.test", "username": "rocketchat.internal.admin.test" }, "groupable": false, "_updatedAt": "2018-10-05T00:11:16.998Z" } ], "count": 2, "offset": 0, "total": 2, "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 'roomId'\n must have required property 'roomName'\n must match exactly one schema in oneOf [invalid-params]", "errorType": "error-invalid-params" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" }, "Optional-RoomId": { "name": "roomId", "in": "query", "description": "The room ID. It is required if the `roomName` is not provided.", "schema": { "type": "string" }, "example": "dlpfuijw7ej" }, "Optional-RoomName": { "name": "roomName", "in": "query", "description": "The room name. It is required if the `roomId` is not provided.", "required": false, "schema": { "type": "string" }, "example": "general" }, "fields": { "name": "fields", "in": "query", "description": "This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: `fields={ \"username\": 1 }`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#query-and-fields) to learn more.", "required": false, "schema": { "type": "string" } }, "sort": { "name": "sort", "in": "query", "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.", "required": false, "schema": {} }, "offset": { "name": "offset", "in": "query", "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.", "required": false, "schema": { "type": "integer" }, "example": 50 }, "count": { "name": "count", "in": "query", "description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.", "required": false, "schema": { "type": "integer" }, "example": 50 } }, "schemas": { "Attachment": { "type": "object", "properties": { "ts": { "type": "string", "example": "1970-01-01T00:00:00Z" }, "title": { "type": "string" }, "title_link": { "type": "string" }, "title_link_download": { "type": "boolean" }, "image_dimensions": { "type": "object", "properties": { "width": { "type": "integer", "example": 444 }, "height": { "type": "integer", "example": 360 } } }, "image_preview": { "type": "string", "example": "/9j/2wBDAAYEBQ..." }, "image_url": { "type": "string", "example": "/file-upload/PNTaE9SBQasdpAwk2/img_1.jpg" }, "image_type": { "type": "string", "example": "image/jpeg" }, "image_size": { "type": "integer", "example": 26674 }, "type": { "type": "string", "example": "file" }, "description": { "type": "string", "example": "" } } } }, "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." } } } } } } } } } ````