> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Message table

> Definition of a message, corresponding to the header of a protocol

## Message Table (242)

Definition of a message, corresponding to the header of a protocol

## Fields

| Name                      | Description                                            | Type                                                    | Nullable |
| ------------------------- | ------------------------------------------------------ | ------------------------------------------------------- | :------: |
| Message\_id               | Primary key                                            | PK                                                      |    No    |
| registered                | Registered when                                        | UtcDateTime                                             |    No    |
| registered\_associate\_id | Registered by whom                                     | FK [associate](./associate.mdx)                         |    No    |
| updated                   | Last updated when                                      | UtcDateTime                                             |    No    |
| updated\_associate\_id    | Last updated by whom                                   | FK [associate](./associate.mdx)                         |    No    |
| updatedCount              | Number of updates made to this record                  | UShort                                                  |    No    |
| associateId               | The associate that is the target of this message       | FK [associate](./associate.mdx)                         |    No    |
| onlineapp\_id             | The online app that owns this message                  | FK [OnlineApp](./onlineapp.mdx)                         |    No    |
| systemMessageId           | Message identifier, used for message update or removal | String(255)                                             |    No    |
| markdownMessage           | Markdown message to be displayed to user               | String(4000)                                            |    No    |
| expire                    | The date and time the message expires                  | UtcDateTime                                             |    No    |
| type                      | Type of message, example: info, warning, error         | Enum [SystemMessageType](./enums/systemmessagetype.mdx) |    No    |

<img src="https://mintcdn.com/superofficeas/zNQa3AO19PFK63SB/media/loc/en/database/tables/Message.png?fit=max&auto=format&n=zNQa3AO19PFK63SB&q=85&s=e04bf3a908a46e9bd6a5e08418ee5ad8" alt="Message table relationship diagram" width="634" height="66" data-path="media/loc/en/database/tables/Message.png" />

## Indexes

| Fields                                      | Types               | Description |
| ------------------------------------------- | ------------------- | ----------- |
| associateId, systemMessageId, onlineapp\_id | FK, String(255), FK | Unique      |

## Relationships

| Table                    | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| [associate](./associate) | Employees, resources and other users - except for External persons |
| [OnlineApp](./onlineapp) | Echo and track information about Online Apps and their usage       |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [ej_message table](/en/database/tables/ej-message.md)
- [chat_message table](/en/database/tables/chat-message.md)
- [outgoing_message table](/en/database/tables/outgoing-message.md)
- [System Messages](/en/developer-portal/best-practices/system-messages.md)
- [Send Messages](/en/api/reference/restful/agent/messaging_agent/send-messages.md)
- [Send Messages With Config](/en/api/reference/restful/agent/messaging_agent/send-messages-with-config.md)
