Skip to main content
POST
/
agents
/
session
/
messages
/
list
List agent messages
curl --request POST \
  --url https://api.kaizenautomation.com/agents/session/messages/list \
  --header 'Content-Type: application/json' \
  --data '
{
  "threadId": "agent_conversation_thread_abc123",
  "limit": 1000,
  "offset": 0
}
'
{
  "messages": [
    {
      "role": "<string>",
      "parts": [
        {
          "type": "<string>",
          "text": "<string>"
        }
      ]
    }
  ],
  "total": 123
}

Body

application/json

Request parameters for listing messages in a thread

threadId
string
required

External ID of the thread to list messages for

Example:

"agent_conversation_thread_abc123"

limit
integer
default:1000

Maximum number of messages to return (default 1000, max 1000)

Required range: 1 <= x <= 1000
offset
integer
default:0

Number of messages to skip for pagination

Required range: x >= 0

Response

Messages retrieved successfully

Paginated list of messages in a thread

messages
object[]
required

List of messages in the thread

A message in the conversation

total
integer
required

Total number of messages in the thread