Conversation object that tracks message history, read states, and user preferences.
GetChats
Retrieve a paginated list of all your conversations (including both DMs and group chats).Parameters
Maximum number of conversations to return in the response
Snowflake Chat ID - Return only chats with IDs less than this value (for backward pagination)
Snowflake Chat ID - Return only chats with IDs greater than this value (for forward pagination)
Response: Chats
The response includes all related data to render the conversations list:Array of conversation objects, each representing a DM or group chat with read state information
All user objects referenced in the conversations (DM participants, group members, message authors)
Group objects for any group chats included in the response
Channel objects if any conversations involve channels
The last message for each conversation (used for previews)
GetChat
Retrieve detailed information about a specific conversation.Parameters
Reference to the chat to retrieve. Can specify by user ID (for DMs) or chat ID (for groups)
Response: Chat
Returns complete information about a single conversation:The conversation object with read states and metadata
The last message in the conversation (if any)
All users involved in the conversation
Group information if this is a group chat
Channel information if this conversation is in a channel context
Conversation Type
TheConversation type tracks the state of a chat from the current user’s perspective:
Fields
Reference identifying this conversation (user ID for DMs, chat ID for groups)
Snowflake Message ID of the most recent message. Defaults to chat ID if no messages exist. Used for sorting conversations by recency
Snowflake Message ID of the last message the current user has read
Number of unread messages in this conversation
Unsent message draft saved for this conversation
Permission overrides for this conversation (if any)
Whether the user has muted notifications for this conversation
Permission Overrides
Permissions can be customized per conversation:Bitfield of permissions to explicitly grant
Bitfield of permissions to explicitly deny
Usage Example
- Listing Conversations: Call
GetChatsto retrieve all DMs and group chats - Opening a DM: Call
GetChatwith aChatRefpointing to the user - Tracking Read State: The
Conversationobject includesunread_countandlast_read_message_id - Sorting: Use
last_message_idto sort conversations by most recent activity
Related
- Group Chats - Creating and managing group conversations
- Conversations - Read states, typing indicators, and invites
- Messages - Sending and receiving messages