Conversations
Conversation related APIs
Get a list of conversations. The conversations are default sorted by last chat time in descending order.
Search for last chat time after this value
Search for last chat time before this value
Search for first chat time after this value
Search for first chat time before this value
50
false
LAST_CHAT_TIME_DESC
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
GET /webapi/v2/conversations HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
{
"conversations": [
{
"id": "text",
"title": "text",
"user": {
"userId": "text",
"firstName": "text",
"lastName": "text"
},
"createdAt": 1,
"lastChatTime": 1,
"isEnd": true,
"categories": [
"text"
],
"memo": "text",
"chats": [
{
"id": "text",
"sender": "USER",
"message": "text",
"timestamp": 1,
"citations": [
{
"clueId": "text",
"source": "text",
"title": "text",
"knowledgeBaseId": "text",
"pageNo": 1,
"url": "text",
"text": "text"
}
],
"rating": true,
"agentRating": true
}
],
"chatCount": 1,
"llmApp": {
"id": "text",
"name": "text",
"description": "text"
},
"variables": {}
}
],
"cursor": "text"
}
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
The ID of the user for filtering
The ID of the llm app for filtering
The ID of the conversation category for filtering
The ID of the conversation for filtering
OK
POST /webapi/v2/conversations/bulk_update HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 181
{
"userIds": [
"text"
],
"llmAppIds": [
"text"
],
"categoryIds": [
"text"
],
"conversationIds": [
"text"
],
"conversationInfo": {
"state": "no",
"assignee": "text",
"categoryIds": [
"text"
],
"title": "text"
}
}
OK
No content
Get a conversation.
The chats provided in conversation are the most recent 20.
Comma separated list of variables to include in the response
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
GET /webapi/v2/conversations/{conversation_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
{
"id": "text",
"title": "text",
"user": {
"userId": "text",
"firstName": "text",
"lastName": "text"
},
"createdAt": 1,
"lastChatTime": 1,
"isEnd": true,
"categories": [
"text"
],
"memo": "text",
"chats": [
{
"id": "text",
"sender": "USER",
"message": "text",
"timestamp": 1,
"citations": [
{
"clueId": "text",
"source": "text",
"title": "text",
"knowledgeBaseId": "text",
"pageNo": 1,
"url": "text",
"text": "text"
}
],
"rating": true,
"agentRating": true
}
],
"chatCount": 1,
"llmApp": {
"id": "text",
"name": "text",
"description": "text"
},
"variables": {}
}
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
The state of the conversation
The assignee of the conversation
The ID of the category
The title of the conversation
OK
PATCH /webapi/v2/conversations/{conversation_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 70
{
"state": "no",
"assignee": "text",
"categoryIds": [
"text"
],
"title": "text"
}
OK
{
"id": "text",
"title": "text",
"user": {
"userId": "text",
"firstName": "text",
"lastName": "text"
},
"createdAt": 1,
"lastChatTime": 1,
"isEnd": true,
"categories": [
"text"
],
"memo": "text",
"chats": [
{
"id": "text",
"sender": "USER",
"message": "text",
"timestamp": 1,
"citations": [
{
"clueId": "text",
"source": "text",
"title": "text",
"knowledgeBaseId": "text",
"pageNo": 1,
"url": "text",
"text": "text"
}
],
"rating": true,
"agentRating": true
}
],
"chatCount": 1,
"llmApp": {
"id": "text",
"name": "text",
"description": "text"
},
"variables": {}
}
Get a conversation chats. The chats are sorted by timestamp in ascending order.
Chat page size is 100.
1
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
GET /webapi/v2/conversations/{conversation_id}/chats HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
{
"chats": [
{
"id": "text",
"sender": "USER",
"message": "text",
"timestamp": 1,
"citations": [
{
"clueId": "text",
"source": "text",
"title": "text",
"knowledgeBaseId": "text",
"pageNo": 1,
"url": "text",
"text": "text"
}
],
"rating": true,
"agentRating": true
}
],
"pageNo": 1,
"totalCount": 1
}
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
GET /webapi/v2/conversations/{conversation_id}/running HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
{
"isRunning": true
}
Stop a running conversation.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
POST /webapi/v2/conversations/{conversation_id}/stop HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
No content
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
DELETE /webapi/v2/conversations/{conversation_id}/chats/{chat_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
No content
Set a conversation title.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
The title of the conversation
OK
PUT /webapi/v2/conversations/{conversation_id}/title HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"title": "text"
}
OK
{
"id": "text",
"title": "text",
"user": {
"userId": "text",
"firstName": "text",
"lastName": "text"
},
"createdAt": 1,
"lastChatTime": 1,
"isEnd": true,
"categories": [
"text"
],
"memo": "text",
"chats": [
{
"id": "text",
"sender": "USER",
"message": "text",
"timestamp": 1,
"citations": [
{
"clueId": "text",
"source": "text",
"title": "text",
"knowledgeBaseId": "text",
"pageNo": 1,
"url": "text",
"text": "text"
}
],
"rating": true,
"agentRating": true
}
],
"chatCount": 1,
"llmApp": {
"id": "text",
"name": "text",
"description": "text"
},
"variables": {}
}
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
The rating of chat
The feedback selection
The suggested answer
OK
POST /webapi/v2/conversations/{conversation_id}/chats/{chat_id}/feedback HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"rating": true,
"feedbackSelection": [
"not_relevant"
],
"suggestedAnswer": "text"
}
OK
{
"conversationId": "text",
"chatId": "text",
"rating": true
}
The total number of conversations per day for a given range.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
Start of range of dates to query in YYYY-MM-DD format.
End of range of dates to query in YYYY-MM-DD format.
Successfully retrieved daily conversation count
GET /webapi/conversation_daily_count HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"startDate": "text",
"endDate": "text"
}
Successfully retrieved daily conversation count
{
"result": {
"dailyTotalCount": [
{
"date": "text",
"activeCount": 1
}
],
"state": "text",
"campaignCount": 1
},
"errors": {}
}
Was this helpful?