Skip to main content
Version: v2

SearchChatsResponse

Chat search results

chats object[]required

Array of found chats

  • Array [
  • chatIdstringrequired

    Chat ID

    Example: w:AIQffAsGia
    workspaceIdstringrequired

    ID of the workspace the chat belongs to

    Example: w:AIQffAsGi8
    metadata objectrequired

    Contains chat-type-specific information. One of the fields is populated depending on the chat type

    personal object

    Contains information about the personal chat

    otherMembershipIdstringrequired

    MembershipId of the other party

    Example: aIQffAsGia
    workspace object

    Information about the workspace chat

    namestringrequired

    Chat name

    Example: News
    announcebooleanrequired

    Whether the chat is an announcement chat

    Example: true
    chatTypeWorkspaceChatType (string)required

    Chat type

    Possible values: [PRIVATE, PUBLIC, GENERAL]

    Example: PUBLIC
    autoJoinNewMembersbooleanrequired

    Whether new workspace members are automatically added to the chat

    Example: true
    descriptionstring

    Chat description

    Example: Company news
    memberCountintegerrequired

    Number of members

    Example: 5
    thread object

    Thread information

    parentChatIdstringrequired

    ChatId of the parent chat where the parent message is located

    Example: w:aIQffAsGia
    parentMessageIdstringrequired

    MessageId of the parent message the thread belongs to

    Example: bIQffAsGia
    conference object

    Conference chat information

    conferenceIdstringrequired

    Identifier of the conference the chat relates to

    Example: dIQffAsGia
    userEvents object

    Information about the chat with personal notifications

    ownerstringrequired

    MembershipId of the owner

    Example: aIQffAsGia
    createdAtstring<date-time>required

    Date and time the chat was created

    Example: 2023-02-26T18:58:36.154+03:00
    updatedAtstring<date-time>required

    Date and time the chat was last modified. The field is used only for Workspace chats

    Example: 2023-02-26T18:58:36.154+03:00
    archivedAtstring<date-time>

    Date and time the chat was archived. The field is used only for Workspace chats

    Example: 2023-02-26T18:58:36.154+03:00
    archivedBystring

    MembershipId of the member who archived the chat

    Example: fIQffAsGi8
    chatRoleChatRole (string)

    The bot's role in the chat. The field is used only for Workspace chats

    Possible values: [MEMBER, ADMIN, OWNER]

    Example: ADMIN
    chatPermissionsChatPermission (string)[]

    Array of the bot's ChatPermission values in this chat. The field is used only for Workspace chats

    Possible values: [CHANGE_ROLE, ARCHIVE_CHAT, RENAME_CHAT, UPDATE_CONFIG, KICK_FROM_CHAT, SEND_MESSAGES_TO_ANNOUNCE_CHANNEL, PIN_CHAT_MESSAGE, SCHEDULE_CONFERENCE, DELETE_CHAT_MESSAGE, UPDATE_PERMISSIONS, FORWARD_MESSAGES]

  • ]
  • nextPageTokenstring

    Next page token

    prevPageTokenstring

    Previous page token

    allResultCountinteger<int64>required

    Total number of results found

    SearchChatsResponse
    {
    "chats": [
    {
    "chatId": "w:AIQffAsGia",
    "workspaceId": "w:AIQffAsGi8",
    "metadata": {
    "personal": {
    "otherMembershipId": "aIQffAsGia"
    },
    "workspace": {
    "name": "News",
    "announce": "true",
    "chatType": "PUBLIC",
    "autoJoinNewMembers": "true",
    "description": "Company news",
    "memberCount": "5"
    },
    "thread": {
    "parentChatId": "w:aIQffAsGia",
    "parentMessageId": "bIQffAsGia"
    },
    "conference": {
    "conferenceId": "dIQffAsGia"
    },
    "userEvents": {
    "owner": "aIQffAsGia"
    }
    },
    "createdAt": "2023-02-26T18:58:36.154+03:00",
    "updatedAt": "2023-02-26T18:58:36.154+03:00",
    "archivedAt": "2023-02-26T18:58:36.154+03:00",
    "archivedBy": "fIQffAsGi8",
    "chatRole": "ADMIN",
    "chatPermissions": [
    "CHANGE_ROLE"
    ]
    }
    ],
    "nextPageToken": "string",
    "prevPageToken": "string",
    "allResultCount": 0
    }