> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-mintlify-715169f7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Messaging overview for the CometChat Flutter SDK

> Understand CometChat Flutter messaging, including text, media, custom, card, action, and call message structures, and the message class hierarchy.

Messaging is one of the core features of CometChat. We've thoughtfully created methods to help you send, receive, and fetch message history.

At the minimum, you must add code for [sending messages](/sdk/flutter/send-message) and [receiving messages](/sdk/flutter/receive-messages).

Once you've implemented that, you can proceed to more advanced features like [typing indicators](/sdk/flutter/typing-indicators) and [delivery & read receipts](/sdk/flutter/delivery-read-receipts).

## Message Structure and Hierarchy

Every message in CometChat belongs to one of the following categories:

<Frame>
  <img src="https://mintcdn.com/cometchat-22654f5b-mintlify-715169f7/tHFSzwn9c2JJMC9r/images/message-structure-hierarchy-card.svg?fit=max&auto=format&n=tHFSzwn9c2JJMC9r&q=85&s=37acbed89806cfb6c7f10a7607672339" alt="CometChat message categories and types hierarchy: message, custom, card, action, and call" width="1366" height="800" data-path="images/message-structure-hierarchy-card.svg" />
</Frame>

| Category  | Description                                                                           |
| --------- | ------------------------------------------------------------------------------------- |
| `message` | Standard messages: text, image, video, audio, file                                    |
| `custom`  | Developer-defined messages for sending custom data that doesn't fit the default types |
| `card`    | Structured, interactive card messages (receive-only) rendered as a card bubble        |
| `action`  | System-generated messages for group member actions or message actions                 |
| `call`    | Call-related messages: audio or video                                                 |

### Message

A message belonging to the category `message` can be one of the following types:

1. **text** — A plain text message
2. **image** — An image message
3. **video** — A video message
4. **audio** — An audio message
5. **file** — A file message

### Custom

For messages that belong to the `custom` category, there are no predefined types. Custom messages can be used to send data that does not fit the default categories and types. Developers can set their own type to uniquely identify the custom message. For example, sharing location coordinates could use a custom message with type set to `location`.

### Card

A message belonging to the `card` category is a `CardMessage` — a structured, interactive message rendered as a card bubble. The `card` category has no predefined types; the layout is described by a block of card schema JSON that the CometChat Cards library renders.

Card Messages are **receive-only**: they are created via the Platform REST API or the Dashboard Bubble Builder and delivered to clients like any other message. See [Send a Message → Card Message](/sdk/flutter/send-message#card-message) for the `CardMessage` fields and [Receive Messages → Receiving Card Messages](/sdk/flutter/receive-messages#receiving-card-messages) for handling incoming card messages.

### Action

Action messages are system-generated. Messages belonging to the `action` category can be of type:

1. **groupMember** — action performed on a group member
2. **message** — action performed on a message

Action messages hold a property called `action` which determines the action that has been performed.

For the type `groupMember`, the action can be:

1. **joined** — when a group member joins a group
2. **left** — when a group member leaves a group
3. **kicked** — when a group member is kicked from the group
4. **banned** — when a group member is banned from the group
5. **unbanned** — when a group member is unbanned from the group
6. **added** — when a user is added to the group
7. **scopeChanged** — when the scope of a group member is changed

For the type `message`, the action can be:

1. **edited** — when a message is edited
2. **deleted** — when a message is deleted

### Call

Call messages can be of type `audio` or `video`. They include a `status` property which indicates the state of the call:

1. **initiated** — when a call is initiated to a user/group
2. **ongoing** — when the receiver has accepted the call
3. **canceled** — when the call has been canceled by the initiator
4. **rejected** — when the call has been rejected by the receiver
5. **unanswered** — when the call was not answered by the receiver
6. **busy** — when the receiver was busy on another call
7. **ended** — when the call was successfully completed and ended
