List conversations
Get a list of all the chatbot’s conversations with users.
curl --request GET \
--url https://api.chatling.ai/v2/chatbots/{chatbotId}/conversations \
--header 'Authorization: Bearer <token>'
{
"status": "success",
"data": {
"pages": {
"current_page": 1,
"last_page": 11,
"per_page": 5
},
"conversations": [
{
"id": "8977617953",
"contact_id": "qtr89df0-112d-d197-b541-3f8674663246",
"archived": 0,
"important": 1,
"created_at": "2024-06-14T15:45:34+00:00",
"messages": [
{
"text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.",
"role": "bot",
"is_ai_kb_response": true,
"data": {
"helpful_value": null,
"sources": [
{
"type": "webpage",
"title": "Types of variables - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/variables/variable-types"
},
{
"type": "webpage",
"title": "Sidebar - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/sidebar"
},
{
"type": "webpage",
"title": "What are variables? - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/variables/what-are-variables"
}
]
},
"created_at": "2024-06-17T16:09:52+00:00"
},
{
"text": "What are system variables",
"role": "user",
"created_at": "2024-06-17T16:09:45+00:00"
},
{
"text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!",
"role": "bot",
"is_ai_kb_response": true,
"data": {
"helpful_value": null,
"sources": []
},
"created_at": "2024-06-14T15:45:39+00:00"
},
{
"text": "Hello!",
"role": "user",
"created_at": "2024-06-14T15:45:34+00:00"
}
]
}
]
}
}
Request parameters
Path
The chatbot ID.
Query
The page number for pagination.
The sort order. Possible values:
date_desc
: Sort by date in descending order.date_asc
: Sort by date in ascending order.
Response
The status of the request. Will be success
if the request was successful, otherwise error
.
The current page number.
The last page number.
The number of items per page.
The unique identifier of the conversation.
The unique identifier of the contact associated with the conversation.
Whether the conversation is archived (by the admin).
Whether the conversation is marked as important.
The date and time when the conversation was created.
List of the most recent 20 messages in the conversation.
The unique identifier of the message.
The text content of the message.
The role of the sender of the message (bot, user, or system).
Whether the message is generated by the AI using the knowledge base.
The data of the message. Varies depending on the message type.
(AI response) Whether the AI’s response was marked as helpful by the user. Possible values are 1
for helpful, 0
for not helpful, and null
for not rated.
(AI response) The sources used by the AI to generate the response.
The date and time when the message was created.
{
"status": "success",
"data": {
"pages": {
"current_page": 1,
"last_page": 11,
"per_page": 5
},
"conversations": [
{
"id": "8977617953",
"contact_id": "qtr89df0-112d-d197-b541-3f8674663246",
"archived": 0,
"important": 1,
"created_at": "2024-06-14T15:45:34+00:00",
"messages": [
{
"text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.",
"role": "bot",
"is_ai_kb_response": true,
"data": {
"helpful_value": null,
"sources": [
{
"type": "webpage",
"title": "Types of variables - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/variables/variable-types"
},
{
"type": "webpage",
"title": "Sidebar - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/sidebar"
},
{
"type": "webpage",
"title": "What are variables? - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/variables/what-are-variables"
}
]
},
"created_at": "2024-06-17T16:09:52+00:00"
},
{
"text": "What are system variables",
"role": "user",
"created_at": "2024-06-17T16:09:45+00:00"
},
{
"text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!",
"role": "bot",
"is_ai_kb_response": true,
"data": {
"helpful_value": null,
"sources": []
},
"created_at": "2024-06-14T15:45:39+00:00"
},
{
"text": "Hello!",
"role": "user",
"created_at": "2024-06-14T15:45:34+00:00"
}
]
}
]
}
}
curl --request GET \
--url https://api.chatling.ai/v2/chatbots/{chatbotId}/conversations \
--header 'Authorization: Bearer <token>'
{
"status": "success",
"data": {
"pages": {
"current_page": 1,
"last_page": 11,
"per_page": 5
},
"conversations": [
{
"id": "8977617953",
"contact_id": "qtr89df0-112d-d197-b541-3f8674663246",
"archived": 0,
"important": 1,
"created_at": "2024-06-14T15:45:34+00:00",
"messages": [
{
"text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.",
"role": "bot",
"is_ai_kb_response": true,
"data": {
"helpful_value": null,
"sources": [
{
"type": "webpage",
"title": "Types of variables - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/variables/variable-types"
},
{
"type": "webpage",
"title": "Sidebar - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/sidebar"
},
{
"type": "webpage",
"title": "What are variables? - Chatling Documentation",
"url": "https://docs.chatling.ai/builder/variables/what-are-variables"
}
]
},
"created_at": "2024-06-17T16:09:52+00:00"
},
{
"text": "What are system variables",
"role": "user",
"created_at": "2024-06-17T16:09:45+00:00"
},
{
"text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!",
"role": "bot",
"is_ai_kb_response": true,
"data": {
"helpful_value": null,
"sources": []
},
"created_at": "2024-06-14T15:45:39+00:00"
},
{
"text": "Hello!",
"role": "user",
"created_at": "2024-06-14T15:45:34+00:00"
}
]
}
]
}
}