Magidoc

getMessages
Query

Lists or searches messages in chats the caller can access. A groupId scopes results to that chat or thread; omitting groupId requires text and searches accessible chats. Parent-chat results exclude thread replies, which are retrieved newest-first using threadId as groupId. Use findChats with member IDs to resolve a person's chat before reading it. Requires membership in the chat or, for threads, its parent chat.

Arguments

#

automated

Filter automated messages; false includes legacy messages without this field.

workspaceId

ID !
Non-null

ID of the workspace

groupId

Optional ID of the group, or a thread ID (a message's threadId) to fetch that thread's replies. If omitted with text, searches all accessible groups.

text

Text to search within messages. Required if groupId is not provided.

first = 10

Number of messages to return (default: 10, max: 50)

Response

#

Returns MessageConnection !.

Example

#