Chat

A chat is a conversation. There are currently two types of chats: Group Chats and DM Chats.

  • The category the chat is in. Will be null for a DM chat or if a Group chat is uncategorized.

  • The unique identifier of the chat

  • The type of chat. If this is true the it's a DM chat. Otherwise it's a Group chat.

  • Whether or not the Chat has been classified a Supergroup

  • 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.

  • 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_owner role only appears on thread chats (the thread creator).

    Properties: 15
  • The date and time that the message was pinned.

  • The date and time that the pinned message will be automatically unpinned

  • The id of the message that has been pinned.

  • The id of the user that pinned the message.

  • The title of the chat. For a DM chat this will contain the names of both chat participants

  • The key to correlate this chat with an external service. DM chats do not have external_id properties.

  • Whether this chat is a thread belonging to a parent chat.

  • The most recent user message in this thread. Only available through endpoints that support the include=latest_user_message query parameter.

    Properties: 33
  • ID of the parent chat. Only present for threads.

  • 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.

  • The message that spawned this thread. Only available through endpoints that support the include=source_message query parameter, or when a thread is created from a message.

    Properties: 33
  • ID of the message that spawned this thread, if any. Only present for threads.