Get Channel Messages

Get
/api/v1/channels.messages

Lists all the channel's messages. Permissions required: view-c-room, view-joined-room

Changelog

Version Description
7.0.0 Added mentionIds, starredIds, pinned query parameters.
0.59.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Query parameters
roomId
stringRequired

The room id.

Examplejdiue8TGkodp
count
integer

The number of items to return. Refer to the official documentation to learn more.

Example50
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 to learn more.

offset
integer

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.

Example50
mentionIds
string

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

Example838ndhd79w
starredIds
string

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

Exampledud0wu900
pinned
boolean

Filter pinned messages.

ExampleTrue
Responses
200

OK

Success
{
  "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.900Z",
      "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
}
Expand All
object
messages
Array of object
object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
_updatedAt
string
urls
Array of object
object
mentions
Array of object
object
channels
Array of object
object
md
Array of object
object
type
string
value
Array of object
object
type
string
value
string
replies
Array of string
string
tcount
integer
tlm
string
attachments
Array of object
object
editedAt
string
editedBy
object
_id
string
username
string
reactions
object
t
string
_hidden
boolean
parent
string
count
integer
offset
integer
total
integer
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string