Skip to main content

chatConversation

Requires an authenticated session.

Returns one conversation: its title, type, message count and last message time. It is available to the conversation's owner, to members of its channel, and in the default channel. A conversation of another organization reads as missing. 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:

query ChatConversation($id: String!) {
chatConversation(id: $id) {
id
title
type
createdAt
channelId
isGroup
messages {
id
createdAt
content
conversationId
metadata
role
}
}
}

Variables:

{
"id": "string"
}

Response:

{
"data": {
"chatConversation": {
"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"
}
]
}
}
}
chatConversation(
id: String!
): ChatConversation!

Arguments​

chatConversation.id ● String! non-null scalar​

The ID of the conversation.

Type​

ChatConversation object​

A chat conversation: a direct chat, a group or a channel.