Skip to main content
Message categories and types:
  • messagetext, image, video, audio, file
  • custom → Developer-defined types (e.g., location, poll)
  • cardCardMessage (receive-only rich cards)
  • actiongroupMember (joined/left/kicked/banned), message (edited/deleted)
  • callaudio, video
Every message in CometChat belongs to a category (message, custom, card, action, call) and has a specific type within that category.

Message Hierarchy

Categories Overview

Checking Message Category and Type

Use getCategory() and getType() to determine how to handle a received message:

Standard Messages (message Category)

Messages with category message are standard user-sent messages:

Custom Messages (custom Category)

Custom messages allow you to send data that doesn’t fit the default categories. You define your own type to identify the message (e.g., location, poll, sticker).
See Send Message → Custom Messages for details.

Card Messages (card Category)

A message with category card is a CardMessage — a rich, structured card rendered from Card Schema JSON. Card messages are receive-only: they cannot be sent from the SDK. They are created and sent exclusively via the Platform (REST) API or the Dashboard Bubble Builder, and delivered through the onCardMessageReceived callback of the MessageListener. See Receive Messages → Card Messages and Campaigns → Card Messages for details.

Action Messages (action Category)

Action messages are system-generated events. They have a type and an action property: Type: groupMember — Actions on group members:
  • joined — Member joined the group
  • left — Member left the group
  • kicked — Member was kicked
  • banned — Member was banned
  • unbanned — Member was unbanned
  • added — Member was added
  • scopeChanged — Member’s scope was changed
Type: message — Actions on messages:
  • edited — Message was edited
  • deleted — Message was deleted

Call Messages (call Category)

Call messages track call events with types audio or video. The status property indicates the call state: See Default Calling or Direct Calling for implementation.

Next Steps

Send Messages

Send text, media, and custom messages

Receive Messages

Listen for incoming messages in real time

Card Messages

Receive and render rich, structured card messages

Message Filtering

Advanced message filtering with RequestBuilder