Skip to main content
GET
/
api
/
v1
/
chatmessage
/
{chatflowId}
/
{chatId}
/
{memoryType}
Get Message
curl --request GET \
  --url https://api.example.com/api/v1/chatmessage/{chatflowId}/{chatId}/{memoryType}
{
  "401": {},
  "404": {},
  "412": {},
  "500": {},
  "id": "<string>",
  "role": "<string>",
  "content": "<string>",
  "chatflowid": "<string>",
  "chatId": "<string>",
  "memoryType": "<string>",
  "sessionId": "<string>",
  "createdDate": {},
  "sourceDocuments": [
    {}
  ],
  "usedTools": [
    {}
  ],
  "agentReasoning": [
    {}
  ]
}
Retrieve messages for a specific chat session with a given memory type. This endpoint is useful for accessing conversation history with specific memory configurations.

Path Parameters

chatflowId
string
required
The chatflow or agentflow ID
chatId
string
required
The chat session ID
memoryType
string
required
The memory type used in the conversation (e.g., buffer, window, summary)

Response

id
string
Unique identifier for the message
role
string
Message role: user or assistant
content
string
The message content/text
chatflowid
string
ID of the chatflow/agentflow
chatId
string
Chat session identifier
memoryType
string
Type of memory used
sessionId
string
Session identifier
createdDate
timestamp
When the message was created
sourceDocuments
array
Source documents referenced in the response
usedTools
array
Tools used to generate the response
agentReasoning
array
Agent’s reasoning steps

Example Request

curl -X GET \
  'https://your-flowise-instance.com/api/v1/chatmessage/abc123-def456/session-xyz/buffer' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Example Response

[
  {
    "id": "msg-001",
    "role": "user",
    "content": "Tell me about your capabilities",
    "chatflowid": "abc123-def456",
    "chatId": "session-xyz",
    "memoryType": "buffer",
    "sessionId": "sess-123",
    "createdDate": "2024-01-20T15:30:00Z"
  },
  {
    "id": "msg-002",
    "role": "assistant",
    "content": "I'm an AI assistant that can help with various tasks...",
    "chatflowid": "abc123-def456",
    "chatId": "session-xyz",
    "memoryType": "buffer",
    "sessionId": "sess-123",
    "createdDate": "2024-01-20T15:30:03Z"
  }
]

Error Responses

401
error
Unauthorized - Invalid or missing API key
404
error
Not Found - No messages found for the specified parameters
412
error
Precondition Failed - Missing required path parameters
500
error
Internal Server Error - Error retrieving messages

Build docs developers (and LLMs) love