List Messages
List CometChat messages with REST API using filters for users, groups, categories, types, timestamps, and threads.
Authorizations
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Headers
UID of the user on whose behalf the action is performed.
Query Parameters
Fetches messages that include the searchKey.
Fetches messages sent by users who are blocked by the requesting user.
Fetches messages that include attachments.
Displays messages according to the type of attachment. Supported types include: image, video, audio, and file.
image, video, audio, file Fetches messages that include mentions.
Fetches messages that include links.
Fetches messages that include the mentioned comma-separated UIDs.
Fetches messages that include reactions.
Displays messages based on receiverType (user/group)
user, group Determines whether to pull the messages either before or after any message id. Possible values are append(after) and prepend(before).
Retrieves all those messages after the passed id.
Filters messages by category. Possible values: message, action and custom.
message, action, custom Filters messages by type.
Filters messages with sender. If onBehalfOf header is also set then the messages from their common conversations will be filtered.
Filter messages by multiple sender UIDs. Accepts comma-separated UID values.
For the mentioned users, provides blocked information with respect to the UID in onBehalfOf header.
Provides user tags for the mentioned users.
Hides deleted messages from List.
Includes only deleted messages in List.
Shows only messages skipping the replies in the message thread.
Includes unread message count in List.
Retrieves all the unread messages in a conversation. It must be used alongside count query parameter.
Fetches the messages list after a particular sentAt timestamp.
Filter by sentAt start timestamp (Unix timestamp). Filters messages sent on or after this timestamp. Can be used with sentAt[to] for a date range.
1738368000
Filter by sentAt end timestamp (Unix timestamp). Filters messages sent on or before this timestamp. Can be used with sentAt[from] for a date range.
1739059200
Filter by updatedAt start timestamp (Unix timestamp). Filters messages updated on or after this timestamp. Only returns messages that have actually been updated (excludes messages where updatedAt equals createdAt). Can be used with updatedAt[to] for a date range.
1738368000
Filter by updatedAt end timestamp (Unix timestamp). Filters messages updated on or before this timestamp. Only returns messages that have actually been updated (excludes messages where updatedAt equals createdAt). Can be used with updatedAt[from] for a date range.
1739059200
Filter by editedAt start timestamp (Unix timestamp). Filters messages edited on or after this timestamp. Can be used with editedAt[to] for a date range.
1738368000
Filter by editedAt end timestamp (Unix timestamp). Filters messages edited on or before this timestamp. Can be used with editedAt[from] for a date range.
1739059200
The number of records to fetch. Minimum value: 1, Maximum value: 1000
Fetches all the messages belong to a particular conversation.
This will fetch messages along with the tags.
This will fetch only those messages belonging to the mentioned tags.
Fetches messages based on multiple categories.
Fetches messages based on multiple types.
Fetches the messages from this timestamp.
Fetches the messages till this timestamp. It will be ignored if fromTimestamp is missing or empty.
If set to true, the API response will exclude all quotedMessage nodes from the returned messages. This allows clients to fetch only the messages without any quoted messages.