ChatConversations
Introduction
ChatConversations contain ChatMessages and define the users and departments participating in a direct or group conversation.
A conversation may also relate to another intratool resource selected from the supported relatable types.
Model Definition
Alias
chatConversation
Relations
chatUserConversationSettings
Has one
chat_user_conversation_settings.chat_conversation_id, user_id
Relatable types
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.taskAssignment- Relate a TaskAssignment.taskExecution- Relate a TaskExecution.taskTemplate- Relate a TaskTemplate.taskTemplateComposition- Relate aTaskTemplateComposition.
Computed Properties
hash- The hashedidof theChatConversation.
Capabilities
Targetables -
assign_mode,users, anddepartmentsdefine the conversation participants and visibility after thechat-showmodule permission check; they do not create Entity Permissions.URL context - Conversation URLs resolve to access-checked context information.
Translations - The
titlefield is translatable.Notifications - Creating a conversation or adding participants can notify eligible participants who have not muted or archived it.
List
List ChatConversations the current authenticated User owns or is targeted by.
Definition
GET /api/chat/conversations
Example Request
Example Response
Count
Count ChatConversations the current authenticated User owns or is targeted by.
Definition
GET /api/chat/conversations/count
Example Request
Example Response
Show
Show one ChatConversation by ID or hash.
Definition
GET /api/chat/conversations/{chatConversation}
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Example Request
Example Response
Create
Create a new ChatConversation.
Definition
POST /api/chat/conversations
Request Keys
lang_id
string
system language
Language key for the translatable title.
relatable_id
integer | null
null
ID of the related entity. Required with relatable_type.
group
boolean
false
Whether the conversation is a group conversation.
title
string | null
null
Conversation title. Required when group is true.
locked_at
datetime | null
null
Date from which the conversation is locked.
Behavior
The authenticated user becomes the owner; a client-provided
user_idis ignored.assign_modeis set toany_ofand cannot be selected during creation.At least one existing target must be supplied across
user_idsanddepartment_ids; both arrays cannot be empty.The distinct participant count must fit the configured conversation limit. It includes the owner, directly targeted users, and users whose current role belongs to a targeted department. Overlapping selections count each user once; inactive users count, while deleted users do not. Exceeding the limit produces a validation error for
assign_mode.
Example Request
Example Response
Update
Update an existing ChatConversation.
Definition
PUT /api/chat/conversations/{chatConversation}
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Request Keys
user_id
integer
New owner ID. Only the current owner can transfer ownership.
lang_id
string
New language key for the translatable title.
relatable_id
integer | null
New related entity ID. Required with relatable_type.
group
boolean
Whether the conversation is a group conversation.
title
string | null
New conversation title.
locked_at
datetime | null
New date from which the conversation is locked.
Behavior
Only the conversation owner can update it.
The existing
assign_modeis retained. Supplyinguser_idsordepartment_idsreplaces the corresponding targets.The resulting combined user and department targets must remain valid for the retained
assign_mode; withany_of, at least one target must remain.The participant limit is checked against the resulting owner and targets, including unchanged targets. A conversation already above the limit can be updated while its participant count stays the same or decreases; increasing that count is rejected.
Example Request
Example Response
Update notifications
Update unread Notifications for a ChatConversation and its ChatMessages.
Definition
PUT /api/chat/conversations/{chatConversation}/notifications
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Request Keys
seen_at
datetime
Date used to mark matching unread notifications as seen.
read_at
datetime
Date used to mark matching unread notifications as read and seen.
Behavior
At least one of seen_at or read_at is required. Standard result-control filters can restrict the matching notifications. The response data is the number of updated notifications.
Example Request
Example Response
Mark notifications unread
Mark the latest matching ChatMessage notification in a ChatConversation unread for the current authenticated User.
Definition
POST /api/chat/conversations/{chatConversation}/notifications/unread
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Behavior
The user must be allowed to view the conversation.
Only the latest matching chat-message notification is considered. Its
read_atvalue is cleared when it is currently read, whileseen_atis preserved.Repeating the request is idempotent. Response data is
1when a notification changed and0when no change was required.
Example Request
Example Response
Leave
Remove the current authenticated User from a ChatConversation.
Definition
POST /api/chat/conversations/{chatConversation}/leave
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Behavior
The owner cannot leave their own conversation.
The authenticated user must be assigned directly to the conversation. Access through a targeted department alone does not allow the user to leave.
Example Request
Example Response
Delete
Delete an existing ChatConversation.
Definition
DELETE /api/chat/conversations/{chatConversation}
Route Parameters
chatConversation
integer | string
ChatConversation ID or hash.
Behavior
Only the conversation owner can delete it. Deletion removes notifications for the conversation and its messages and clears their outstanding push deliveries.
Example Request
Example Response
Last updated