Skip to main content

chatMessages

Requires an authenticated session.

Lists the messages in one conversation, oldest first, with sender, text and time. The caller must have access to the conversation. 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 ChatMessages($conversationId: String!) {
chatMessages(conversationId: $conversationId) {
id
createdAt
content
conversationId
metadata
role
sender {
id
postalCode
name
firstName
lastName
status
}
}
}

Variables:

{
"conversationId": "string"
}

Response:

{
"data": {
"chatMessages": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"content": "string",
"conversationId": "string",
"metadata": {},
"role": "string",
"sender": {
"id": "id",
"postalCode": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"status": "ACTIVE"
}
}
]
}
}
chatMessages(
conversationId: String!
): [ChatMessage!]!

Arguments​

chatMessages.conversationId ● String! non-null scalar​

The ID of the conversation.

Type​

ChatMessage object​

One message in a chat conversation.