Chat
A chat is a conversation. There are currently two types of chats: Group Chats and DM Chats.
- categoryType: integer | null
_id requiredThe category the chat is in. Will be
nullfor a DM chat or if a Group chat is uncategorized. - idType: integerrequired
The unique identifier of the chat
- isType: boolean
_dm requiredThe type of chat. If this is
truethe it's a DM chat. Otherwise it's a Group chat. - isType: boolean
_supergroup requiredWhether or not the Chat has been classified a Supergroup
- lockedType: booleanrequired
Whether or not the chat is managed by an external service. While locked, the chat cannot be deleted and its title, category, and permissions cannot be changed.
- permissionsType: objectrequiredProperties: 15
Permissions determine which role is needed by a member to perform certain actions in the chat.
For example, if "create_memberships = owner" then a regular "member" in a group chat will not have the option to add new members.
If you want to prevent both owners and members from performing an action you can set a permission to the "system" role. The
thread_ownerrole only appears on thread chats (the thread creator). - pinnedType: string | null
_message _at requiredThe date and time that the message was pinned.
- pinnedType: string | null
_message _expires _at requiredThe date and time that the pinned message will be automatically unpinned
- pinnedType: integer | null
_message _id requiredThe id of the message that has been pinned.
- pinnedType: integer | null
_message _user _id requiredThe id of the user that pinned the message.
- titleType: stringrequired
The title of the chat. For a DM chat this will contain the names of both chat participants
- externalType: string | null
_id The key to correlate this chat with an external service. DM chats do not have external_id properties.
- isType: boolean
_thread Whether this chat is a thread belonging to a parent chat.
- latestType:
_user _message Properties: 33The most recent user message in this thread. Only available through endpoints that support the
include=latest_user_messagequery parameter. - parentType: integer | null
_chat _id ID of the parent chat. Only present for threads.
- participantsType: array of integerdeprecated
Deprecated — use the chat membership endpoints to retrieve members. Present only for non-thread chats; omitted for threads (which may have very large membership lists). Array of
user_id's representing the members in the chat. - sourceType:
_message Properties: 33The message that spawned this thread. Only available through endpoints that support the
include=source_messagequery parameter, or when a thread is created from a message. - sourceType: integer | null
_message _id ID of the message that spawned this thread, if any. Only present for threads.