> ## 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 Channel Messages > Lists all the channel's messages. Permissions required: `view-c-room`, `view-joined-room` ### Changelog | Version | Description | | ------- | -------------------------------------------- | |9.0.0 | Removed the `query` parameter. | | 7.0.0 | Added `mentionIds`, `starredIds`, `pinned` query parameters.| | 0.59.0 | Added | ## OpenAPI ````json GET /api/v1/channels.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/channels.messages": { "get": { "tags": [ "Channels" ], "summary": "Get Channel Messages", "description": "Lists all the channel's messages. Permissions required: `view-c-room`, `view-joined-room`\n\n### Changelog\n\n| Version | Description |\n| ------- | -------------------------------------------- |\n|9.0.0 | Removed the `query` parameter. |\n| 7.0.0 | Added `mentionIds`, `starredIds`, `pinned` query parameters.| \n| 0.59.0 | Added |", "operationId": "get-api-v1-channels.messages", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" }, { "$ref": "#/components/parameters/RoomId" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/sort" }, { "$ref": "#/components/parameters/offset" }, { "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": "838ndhd79w" }, { "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": "string" }, "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" }, "urls": { "type": "array", "items": { "type": "object" } }, "mentions": { "type": "array", "items": { "type": "object" } }, "channels": { "type": "array", "items": { "type": "object" } }, "md": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "string" } } } } } } }, "replies": { "type": "array", "items": { "type": "string" } }, "tcount": { "type": "integer" }, "tlm": { "type": "string" }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "editedAt": { "type": "string" }, "editedBy": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" } } }, "reactions": { "type": "object" }, "t": { "type": "string" }, "_hidden": { "type": "boolean" }, "parent": { "type": "string" } } } }, "count": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" }, "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "messages": [ { "_id": "uASTuwBEu7SBDAxxh", "rid": "6513afeda2f73c7460e18c86", "msg": "threaads produced links", "ts": "2023-09-27T04:36:47.522Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:36:47.698Z", "urls": [], "mentions": [], "channels": [], "md": [ { "type": "PARAGRAPH", "value": [ { "type": "PLAIN_TEXT", "value": "threaads produced links" } ] } ] }, { "_id": "B7Yms4bCvgJsitrBq", "rid": "6513afeda2f73c7460e18c86", "msg": "always do", "ts": "2023-09-27T04:34:38.818Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:34:38.9Z", "urls": [], "mentions": [], "channels": [], "md": [ { "type": "PARAGRAPH", "value": [ { "type": "PLAIN_TEXT", "value": "always do" } ] } ] }, { "_id": "3rfQYmS8MzCKnQbcu", "rid": "6513afeda2f73c7460e18c86", "msg": "", "ts": "2023-09-27T04:34:34.259Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:36:38.258Z", "urls": [], "mentions": [], "channels": [], "replies": [ "rbAXPnMktTFbNpwtJ" ], "tcount": 0, "tlm": "2023-09-27T04:34:50.746Z", "attachments": [], "editedAt": "2023-09-27T04:36:19.494Z", "editedBy": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" }, "reactions": {}, "t": "rm" }, { "_id": "6513b143a2f73c7460e18c88", "rid": "6513afeda2f73c7460e18c86", "msg": "test messages", "ts": "2023-09-27T04:34:34.259Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:36:19.486Z", "urls": [], "mentions": [], "channels": [], "md": [ { "type": "PARAGRAPH", "value": [ { "type": "PLAIN_TEXT", "value": "test messages" } ] } ], "replies": [ "rbAXPnMktTFbNpwtJ" ], "tcount": 1, "tlm": "2023-09-27T04:34:50.746Z", "_hidden": true, "parent": "3rfQYmS8MzCKnQbcu", "editedAt": "2023-09-27T04:36:19.485Z", "editedBy": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" } } ], "count": 4, "offset": 0, "total": 4, "success": true } } } } } }, "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" }, "RoomId": { "name": "roomId", "in": "query", "description": "The room id.", "required": true, "schema": { "type": "string" }, "example": "jdiue8TGkodp" }, "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 }, "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 } }, "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": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````