chatConversations
Requires an authenticated session.
Lists the caller's team chat conversations, including those in channels they belong to and the default channel. Needs a signed-in user.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query ChatConversations {
chatConversations {
id
title
type
createdAt
channelId
isGroup
messages {
id
createdAt
content
conversationId
metadata
role
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query ChatConversations {\n chatConversations {\n id\n title\n type\n createdAt\n channelId\n isGroup\n messages {\n id\n createdAt\n content\n conversationId\n metadata\n role\n }\n }\n}"
}
EOF
Response:
{
"data": {
"chatConversations": [
{
"id": "id",
"title": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"channelId": "string",
"isGroup": true,
"messages": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"content": "string",
"conversationId": "string",
"metadata": {},
"role": "string"
}
]
}
]
}
}
chatConversations: [ChatConversation!]!
Type
ChatConversation object
A chat conversation: a direct chat, a group or a channel.