API Description
View the message list of the specified conversation.
Basic Information
| Request Method | Request URL |
| GET | https://api.helpbots.ai/api/chats/message-list |
Request Parameters
Header
| Parameter Name |
Value
|
Description |
|---|---|---|
| x-api-key | $apikey |
Access token used to verify client identity. You can generate the token in the dashboard. For details, see Get API Key |
Query Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| id | int | Yes |
Agent ID associated with the sent messages |
| conversation_id | string | Yes |
Conversation ID where the messages belong |
| page | int | No |
Page number for pagination Default: 1 |
| pagesize | int | No |
Page size Default: 20 |
Return Parameters
List
| Parameter Name | Type | Description |
|---|---|---|
| message_id | string |
Message ID under the specified conversation ID |
| question | string |
User’s question content |
| answer | string | Agent answer content |
|
aborted_answer
|
string | Content when the answer was stopped |
| source | string |
Message source information |
| add_time | string |
Message creation time |
Source
| Parameter Name | Type | Description |
|---|---|---|
| resource_id | int |
Resource ID |
| resource_type | int |
Resource type |
| content_id | int | Article ID |
| title | string |
Title of the knowledge base article |
| content | string |
Content of the knowledge base article |
| score | double |
Relevance score of the answer |
|
resource_url
|
string |
Source article URL |
Examples
Request Example
curl --location --request GET 'https://api.helpbots.ai/api/chats/message-list?id=18&conversation_id=yourconversationid' \
--header 'x-api-key: yourapikey' \
Response Example
{
"data": {
"list": [
{
"message_id": "hzyyu125qzvttwmkrggh************", # Message ID
"question": "How is the weather today", # Question content
"answer": "Sorry, the knowledge I have learned does not include content related to the question, so I cannot provide an answer for now.", # Answer content
"aborted_answer":"Sorry, the knowledge I have learned does not include...", # Content when the answer was stopped
"source":"[{\"resource_id\":32,\"resource_type\":1,\"content_id\":183*,\"title\":\"\",\"content\":\"\",\"score\":,\"resource_url\":\"\"}]", # Source information
"add_time": "1745481752" # Message sent time
}
],
"total": 1,
"page": 1,
"page_size": 20
},
"msg": "Success",
"code": 200
}