Chat Message

List all chat messages

get

Retrieve all chat messages for a specific chatflow.

Authorizations
Path parameters
idstringRequired

Chatflow ID

Query parameters
chatTypestring · enumOptional

Filter by chat type

Possible values:
orderstring · enumOptional

Sort order

Possible values:
chatIdstringOptional

Filter by chat ID

memoryTypestringOptional

Filter by memory type

Example: Buffer Memory
sessionIdstringOptional

Filter by session ID

startDatestringOptional

Filter by start date

Example: 2025-01-01T11:28:36.000Z
endDatestringOptional

Filter by end date

Example: 2025-01-13T11:28:36.000Z
feedbackbooleanOptional

Filter by feedback

feedbackTypestring · enumOptional

Filter by feedback type. Only applicable if feedback is true

Possible values:
Responses
get
GET /chatmessage/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "role": "apiMessage",
    "chatflowid": "d290f1ee-6c54-4b01-90e6-d701748f0852",
    "content": "Hello, how can I help you today?",
    "sourceDocuments": [
      {
        "pageContent": "This is the content of the page.",
        "metadata": {
          "author": "John Doe",
          "date": "2024-08-24"
        }
      }
    ],
    "usedTools": [
      {
        "tool": "Name of the tool",
        "toolInput": {
          "input": "search query"
        },
        "toolOutput": "text"
      }
    ],
    "fileAnnotations": [
      {
        "filePath": "path/to/file",
        "fileName": "file.txt"
      }
    ],
    "agentReasoning": [
      {
        "agentName": "agent",
        "messages": [
          "hello"
        ],
        "nodeName": "seqAgent",
        "nodeId": "seqAgent_0",
        "usedTools": [
          {
            "tool": "Name of the tool",
            "toolInput": {
              "input": "search query"
            },
            "toolOutput": "text"
          }
        ],
        "sourceDocuments": [
          {
            "pageContent": "This is the content of the page.",
            "metadata": {
              "author": "John Doe",
              "date": "2024-08-24"
            }
          }
        ],
        "state": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    ],
    "fileUploads": [
      {
        "data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABjElEQVRIS+2Vv0oDQRDG",
        "type": "image",
        "name": "image.png",
        "mime": "image/png"
      }
    ],
    "action": [
      {
        "id": "61beeb58-6ebe-4d51-aa0b-41d4c546ff08",
        "mapping": {
          "approve": "Yes",
          "reject": "No",
          "toolCalls": []
        },
        "elements": []
      }
    ],
    "chatType": "INTERNAL",
    "chatId": "chat12345",
    "memoryType": "text",
    "sessionId": "text",
    "createdDate": "2024-08-24T14:15:22Z",
    "leadEmail": "user@example.com"
  }
]

Delete all chat messages

delete

Delete all chat messages for a specific chatflow.

Authorizations
Path parameters
idstringRequired

Chatflow ID

Query parameters
chatIdstringOptional

Filter by chat ID

memoryTypestringOptional

Filter by memory type

Example: Buffer Memory
sessionIdstringOptional

Filter by session ID

chatTypestring · enumOptional

Filter by chat type

Possible values:
startDatestringOptional

Filter by start date

Example: 2025-01-01T11:28:36.000Z
endDatestringOptional

Filter by end date

Example: 2025-01-13T11:28:36.000Z
feedbackTypestring · enumOptional

Filter by feedback type

Possible values:
hardDeletebooleanOptional

If hardDelete is true, messages will be deleted from the third party service as well

Responses
delete
DELETE /chatmessage/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*

No content

Last updated