ChatMessages
Introduction
ChatMessages are the content of a ChatConversation. A message has a concrete type, can contain rich text, require a reading confirmation, or relate to another intratool resource selected from the supported relatable types.
The text field uses the shared Rich Text HTML format.
Model Definition
Alias
chatMessage
Relations
currentReaction
Morph one
reactions.reactable_type, reactions.reactable_id, reactions.user_id
Types
default- A standard message.voiceMessage- A voice message.
Relatable types
chatFile- Relate aChatFile.chatMessage- Relate anotherChatMessage.filemanagerDirectory- Relate a FilemanagerDirectory.filemanagerFile- Relate a FilemanagerFile.form- Relate a Form.formMessage- Relate a FormMessage.infoboardComment- Relate an InfoboardComment.infoboardPost- Relate an InfoboardPost.manualChapter- Relate a ManualChapter.manualEntry- Relate a ManualEntry.report- Relate aReport.survey- Relate a Survey.taskAssignment- Relate a TaskAssignment.taskExecution- Relate a TaskExecution.taskTemplate- Relate a TaskTemplate.taskTemplateComposition- Relate aTaskTemplateComposition.
Computed Properties
hash- The hashedidof theChatMessage.
Capabilities
Targetables - Message visibility and eligible recipients follow the parent ChatConversation; messages do not have independent Entity Permissions.
URL context - Message URLs resolve to access-checked context information.
Translations - The
textfield is translatable.Notifications - Creating a message can notify eligible participants who have not muted or archived the conversation; messages requiring confirmation use a dedicated notification type.
Reactions - Users can add one current emoji reaction and retrieve individual or summarized reactions.
Seen and read tracking - The API tracks message visibility and explicit reading confirmations per user.
List
List ChatMessages from conversations available to the current authenticated User.
Definition
GET /api/chat/messages
Example Request
Example Response
Count
Count ChatMessages from conversations available to the current authenticated User.
Definition
GET /api/chat/messages/count
Example Request
Example Response
List by conversation
List ChatMessages for a ChatConversation.
Definition
GET /api/chat/conversations/{chatConversation}/messages
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Example Request
Example Response
Count by conversation
Count ChatMessages for a ChatConversation.
Definition
GET /api/chat/conversations/{chatConversation}/messages/count
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Example Request
Example Response
Show
Show one ChatMessage by ID or hash.
Definition
GET /api/chat/messages/{chatMessage}
Route Parameters
chatMessage
integer | string
ChatMessage ID or hash.
Example Request
Example Response
Create
Create a new ChatMessage.
Definition
POST /api/chat/messages
Request Keys
lang_id
string
system language
Language key for the translatable text.
relatable_id
integer | null
null
ID of the related entity. Required with relatable_type.
text
string | null
null
Message content. Required when no related entity is supplied.
reading_confirmation
boolean
false
Whether users must explicitly confirm that they read the message.
Keys with * are required.
Behavior
The authenticated user becomes the message author; a client-provided user_id is ignored. Messages cannot be created in a locked conversation.
Example Request
Example Response
Forward
Forward a ChatMessage to another ChatConversation.
Definition
POST /api/chat/messages/{chatMessage}/forward
Route Parameters
chatMessage
integer | string
Source ChatMessage ID or hash.
Request Keys
Keys with * are required.
Behavior
The new message retains the content of the source message, stores the source ID in forwarded_id, and uses the authenticated user as its author. Related chat files are copied to the target conversation. The target conversation must be unlocked.
Example Request
Example Response
Reset
Reset supported relations of a ChatMessage.
Definition
POST /api/chat/messages/{chatMessage}/reset
Route Parameters
chatMessage
integer | string
ChatMessage ID or hash.
Request Keys
reactions
boolean
false
Set to true to remove all message reactions.
Behavior
At least one resettable relation must be set to true. Only the conversation owner can reset message relations.
Example Request
Example Response
Update
Update an existing ChatMessage.
Definition
PUT /api/chat/messages/{chatMessage}
Route Parameters
chatMessage
integer | string
ChatMessage ID or hash.
Request Keys
lang_id
string
New language key for the translatable text.
relatable_id
integer | null
New related entity ID. Required with relatable_type.
text
string | null
New message content. Required when no related entity is supplied.
reading_confirmation
boolean
Whether users must explicitly confirm that they read the message.
Behavior
Only the message author can update it, and only within 15 minutes of creation while the conversation is unlocked. user_id and chat_conversation_id cannot be changed by this endpoint.
Example Request
Example Response
Delete
Delete an existing ChatMessage.
Definition
DELETE /api/chat/messages/{chatMessage}
Route Parameters
chatMessage
integer | string
ChatMessage ID or hash.
Behavior
Only the message author can delete it while the conversation is unlocked. Deleting a message clears its text before soft deletion.
Example Request
Example Response
Last updated