---
title: "Get Group Messages"
slug: "get-group-messages"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
stale: true
---

> ## 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

Get/api/v1/groups.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 |

Header parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Query parametersroomIdstring

The room ID. It is required if the `roomName` is not provided.

Exampledlpfuijw7ej
roomNamestring

The room name. It is required if the `roomId` is not provided.

Examplegeneral
fieldsstring

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={ &quot;username&quot;: 1 }`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#query-and-fields) to learn more.

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}. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.

offsetinteger

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.

Example50
countinteger

The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.

Example50
mentionIdsstring

Filter the messages where a user has been mentioned by the userId. For a set of userIds, use an array (`[&quot;838ndhd79w&quot;, &quot;dud0wu900&quot;]`).

Exampledud0wu900
starredIdsstring

Filter the messages a user have starred by userId. For a set of userIds, use an array (`[&quot;838ndhd79w&quot;, &quot;dud0wu900&quot;]`).

Exampledud0wu900
pinnedboolean

Filter pinned messages.

Exampletrue

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='3526fb69-ea19-46fe-9791-bf1f4e2a0651'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='ec5e42db-abec-4f6e-a467-6f7bd71c4686'>Success</option>
</select>Success

```json
{
  "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
}
```

Expand Allobject  messages Array of object   object  _idstring    
ridstring    
msgstring    
tsstring    
uobject  _idstring    
usernamestring    
namestring    

_updatedAtstring    
reactionsobject  :frowning2:object  usernames Array of string   string    

mentions Array of object   object  
channels Array of object   object  
starredobject  _idstring    

tstring    
groupableboolean    
attachments Array of object (Attachment)   object  tsstring    Example1970-01-01T00:00:00.000Z
titlestring    
title_linkstring    
title_link_downloadboolean    
image_dimensionsobject  widthinteger    Example444
heightinteger    Example360

image_previewstring    Example/9j/2wBDAAYEBQ...
image_urlstring    Example/file-upload/PNTaE9SBQasdpAwk2/img_1.jpg
image_typestring    Exampleimage/jpeg
image_sizeinteger    Example26674
typestring    Examplefile
descriptionstring    Example

countinteger    
offsetinteger    
totalinteger    
successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='7b44647a-cc1b-41e7-9576-9d5c1e000d1b'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='e268c9c1-8d1f-4793-8aa4-04c98c567454'>Example 1</option>
</select>Example 1

```json
{
  "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": "invalid-params"
}
```

object  successboolean    
errorstring    
errorTypestring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='d95ea9a0-8141-49b3-8be0-20bfd85c8927'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='30bce168-f7e0-4ef7-9094-42607eb9bf9d'>Authorization Error</option>
</select>Authorization Error

```json
{
  "status": "error",
  "message": "You must be logged in to do this."
}
```

object  statusstring    
messagestring
