Conversations

Conversation related APIs

Get List Conversations

get

Get a list of conversations. The conversations are default sorted by last chat time in descending order.

Authorizations
Query parameters
userIdsany ofOptional
or
nullOptional
llmAppIdany ofOptional
stringOptional
or
nullOptional
categoryIdany ofOptional
stringOptional
or
nullOptional
startedAtany ofOptional

Search for last chat time after this value

numberOptional
or
nullOptional
endAtany ofOptional

Search for last chat time before this value

numberOptional
or
nullOptional
firstChatStartedAtany ofOptional

Search for first chat time after this value

numberOptional
or
nullOptional
firstChatEndAtany ofOptional

Search for first chat time before this value

numberOptional
or
nullOptional
searchTermany ofOptional
stringOptional
or
nullOptional
cursorany ofOptional
stringOptional
or
nullOptional
variablesany ofOptional
string[]Optional
or
nullOptional
pageSizeinteger · min: 1 · max: 50OptionalDefault: 50
activeOnlybooleanOptionalDefault: false
orderall ofOptionalDefault: LAST_CHAT_TIME_DESC
string · enumOptionalPossible values:
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
get
GET /webapi/v2/conversations HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

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"
}

Set Conversations

post
Authorizations
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
userIdsany ofOptional

The ID of the user for filtering

string[]Optional
or
nullOptional
llmAppIdsany ofOptional

The ID of the llm app for filtering

string[]Optional
or
nullOptional
categoryIdsany ofOptional

The ID of the conversation category for filtering

string[]Optional
or
nullOptional
conversationIdsany ofOptional

The ID of the conversation for filtering

string[]Optional
or
nullOptional
Responses
200

OK

post
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"
  }
}
200

OK

No content

Get Conversation By Id

get

Get a conversation.

The chats provided in conversation are the most recent 20.

Authorizations
Path parameters
conversation_idstringRequired
Query parameters
variablesany ofOptional

Comma separated list of variables to include in the response

string[]Optional
or
nullOptional
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
get
GET /webapi/v2/conversations/{conversation_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

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": {}
}

Set Conversation

patch
Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
stateany ofOptional

The state of the conversation

string · enumOptionalPossible values:
or
nullOptional
assigneeany ofOptional

The assignee of the conversation

stringOptional
or
nullOptional
categoryIdsany ofOptional

The ID of the category

string[]Optional
or
nullOptional
titleany ofOptional

The title of the conversation

stringOptional
or
nullOptional
Responses
200

OK

application/json
patch
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"
}
200

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": {}
}

List Conversation Chats

get

Get a conversation chats. The chats are sorted by timestamp in ascending order.

Chat page size is 100.

Authorizations
Path parameters
conversation_idstringRequired
Query parameters
pageNointeger · min: 1OptionalDefault: 1
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
get
GET /webapi/v2/conversations/{conversation_id}/chats HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

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
}

Get Conversation State By Id

get
Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
get
GET /webapi/v2/conversations/{conversation_id}/running HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

OK

{
  "isRunning": true
}

Stop Conversation

post

Stop a running conversation.

Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

post
POST /webapi/v2/conversations/{conversation_id}/stop HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

OK

No content

Delete Conversation Chat By Id

delete
Authorizations
Path parameters
conversation_idstringRequired
chat_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

delete
DELETE /webapi/v2/conversations/{conversation_id}/chats/{chat_id} HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

OK

No content

Update Conversation Title

put

Set a conversation title.

Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
titlestringRequired

The title of the conversation

Responses
200

OK

application/json
put
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"
}
200

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": {}
}

Post Feedbacks

post
Authorizations
Path parameters
conversation_idstringRequired
chat_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
ratingany ofOptional

The rating of chat

booleanOptional
or
nullOptional
feedbackSelectionany ofOptional

The feedback selection

or
nullOptional
suggestedAnswerany ofOptional

The suggested answer

stringOptional
or
nullOptional
Responses
200

OK

application/json
post
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"
}
200

OK

{
  "conversationId": "text",
  "chatId": "text",
  "rating": true
}

Daily Conversation Count

get

The total number of conversations per day for a given range.

Authorizations
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
startDatestringOptional

Start of range of dates to query in YYYY-MM-DD format.

endDatestringOptional

End of range of dates to query in YYYY-MM-DD format.

Responses
200

Successfully retrieved daily conversation count

application/json
get
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"
}
200

Successfully retrieved daily conversation count

{
  "result": {
    "dailyTotalCount": [
      {
        "date": "text",
        "activeCount": 1
      }
    ],
    "state": "text",
    "campaignCount": 1
  },
  "errors": {}
}

Was this helpful?