Alli API

Alli AnswerBot allows you to build personalized user interaction, give your users full access to your knowledge base, and transform your team's operation efficiency across web and mobile.

Additional documentation can be found at: https://doc.alli.ai/

get
Summary Analytics

https://backend.alli.ai/webapi/summary_analytics
Provides various summarized analytics information for your project.
Request
Response
Request
Headers
API-KEY
required
string
Your API key can be found in your dashboard Settings menu, under the General tab.
Body Parameters
startDate
required
string
Start of range of dates to query in YYYY-MM-DD format.
endDate
required
string
End of range of dates to query in YYYY-MM-DD format.
Response
200: OK
You will get the result in the following JSON format. conversations: Number of conversations made within the date range. conversationsUpDown: For the queried number of days, the percentage change of number of conversations from the preceding number of days. participants: Sum of daily unique counts of users who had conversations with Alli. participantsUpDown: For the queried number of days, the percentage change of sum of users from the preceding number of days. uniqueParticipants: Unique count of users who had conversations with Alli within the date range. uniqueParticipantsUpDown: For the queried number of days, the percentage change of uniqueParticipants from the preceding number of days. queries: Total number of questions toward FAQ or MRC Documents from users. It includes questions asked from the 'Answer with FAQ' node, 'Answer with MRC' node, and the Alli dashboard. queriesUpDown: For the queried number of days, the percentage change of total queries from the preceding number of days. queriedUsers: Sum of daily unique counts of users who asked questions at least once toward FAQ or MRC Documents. queriedUsersUpDown: For the queried number of days, the percentage change of queriedUsers from the preceding number of days. uniqueQueriedUsers: Unique count of users who asked questions at least once toward FAQ or MRC Documents. uniqueQueriedUsersUpDown: For the queried number of days, the percentage change of uniqueQueriedUsers from the preceding number of days. instantResolution: The number of answers customers selected upon their questions from the Answer with FAQ node. instantResolutionUpDown: For the queried number of days, the percentage change of instantResolution from the preceding number of days. aiResponseRate: The ratio of 'Resolved by AI' over the number of questions asked from the Answer with FAQ node. aiResponseRateUpDown: For the queried number of days, the percentage change of aiResponseRate from the preceding number of days. uniqueVisitors: Unique count of visitors to the webpage where Alli SDK is integrated. This number is the 'Number of Users' for billing calculation. uniqueVisitorsUpDown: For the queried number of days, the percentage change of uniqueVisitors from the preceding number of days. totalFaqs: Number of FAQs added. totalFaqsUpDown: For the queried number of days, the percentage change of totalFaqs from the preceding number of days. totalDocuments: Number of Documents uploaded. totalDocumentsUpDown: For the queried number of days, the percentage change of totalDocuments from the preceding number of days.
{
"result": {
"conversations": CONVERSATIONS,
"conversationsUpDown": CONVERSTAIONS_UPDOWN,
"participants": PARTICIPANTS,
"participantsUpDown": PARTICIPANTS_UPDOWN,
"uniqueParticipants": UNIQUE_PARTICIPANTS,
"uniqueParticipantsUpDown": UNIQUE_PARTICIPANTS_UPDOWN,
"queries": QUERIES,
"queriesUpDown": QUERIES_UPDOWN,
"queriedUsers": QUERIED_USERS,
"queriedUsersUpDown": QUERIED_USERS_UPDOWN,
"uniqueQueriedUsers": UNIQUE_QUERIED_USERS,
"uniqueQueriedUsersUpDown": UNIQUE_QUERIED_USERS_UPDOWN,
"instantResolution": INSTANT_RESOLUTION,
"instantResolutionUpDown": INSTANT_RESOLUTION_UPDOWN,
"aiResponseRate": AI_RESPONSE_RATE,
"aiResponseRateUpDown": AI_RESPONSE_RATE_UPDOWN,
"uniqueVisitors": UNIQUE_VISITORS,
"uniqueVisitorsUpDown": UNIQUE_VISITORS_UPDOWN,
"totalFaqs": TOTAL_FAQS,
"totalFaqsUpDown": TOTAL_FAQS_UPDOWN,
"totalDocuments": TOTAL_DOCUMENTS,
"totalDocumentsUpDown": TOTAL_DOCUMENTS_UPDOWN,
"feedbacksUpDown": FEEDBACKS_UPDOWN
},
"errors": null
}

Request Example

Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.

curl -X GET -d '{ "startDate": "2020-11-14",
"endDate": "2020-12-14"}' \
-H 'API-KEY: YOUR_API_KEY' \
https://backend.alli.ai/webapi/summary_analytics

Response Example

{
"result": {
"conversations": 45,
"conversationsUpDown": -45.78,
"participants": 44,
"participantsUpDown": -32.31,
"uniqueParticipants": 43,
"uniqueParticipantsUpDown": -31.75,
"queries": 39,
"queriesUpDown": -56.18,
"queriedUsers": 35,
"queriedUsersUpDown": -46.97,
"uniqueQueriedUsers": 35,
"uniqueQueriedUsersUpDown": -44.44,
"instantResolution": 1,
"instantResolutionUpDown": 0.0,
"aiResponseRate": 100.0,
"aiResponseRateUpDown": 0.0,
"uniqueVisitors": 2077,
"uniqueVisitorsUpDown": -1.05,
"totalFaqs": 0,
"totalFaqsUpDown": 0.0,
"totalDocuments": 0,
"totalDocumentsUpDown": 0.0,
"feedbacksUpDown": 0.0
},
"errors": null
}

get
Daily Conversation Count

https://backend.alli.ai/webapi/conversation_daily_count
The total number of conversations per day for a given range.
Request
Response
Request
Headers
API-KEY
required
string
Your API key can be found in your dashboard Settings menu, under the General tab.
Body Parameters
endDate
required
string
End of range of dates to query in YYYY-MM-DD format.
startDate
required
string
Start of range of dates to query in YYYY-MM-DD format.
Response
200: OK
You will get the result in the following JSON format. dailyTotalCount: List of date and activeCount pairs, where activeCount is the number of conversations on date.
{
"result": {
"dailyTotalCount": [
{
"date": "DATE",
"activeCount": ACTIVE_COUNT
}
],
"state": "NORMAL",
"campaignCount": 1
},
"errors": null
}

Request Example

Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.

curl -X GET -d '{ "startDate": "2020-11-19",
"endDate": "2020-11-24"}' \
-H 'API-KEY: YOUR_API_KEY' \
https://backend.alli.ai/webapi/conversation_daily_count

Response Example

{
"result": {
"dailyTotalCount": [
{
"date": "2020-11-19",
"activeCount": 30
},
{
"date": "2020-11-20",
"activeCount": 49
},
{
"date": "2020-11-21",
"activeCount": 32
},
{
"date": "2020-11-22",
"activeCount": 2
},
{
"date": "2020-11-23",
"activeCount": 31
},
{
"date": "2020-11-24",
"activeCount": 16
}
],
"state": "NORMAL",
"campaignCount": 1
},
"errors": null
}

get
Daily FAQ Count

https://backend.alli.ai/webapi/faq_daily_count
Daily trend of Q&A from FAQ in given date range.
Request
Response
Request
Headers
API-KEY
required
string
Your API key can be found in your dashboard Settings menu, under the General tab.
Body Parameters
startDate
required
string
Start of range of dates to query in YYYY-MM-DD format.
endDate
required
string
End of range of dates to query in YYYY-MM-DD format.
Response
200: OK
You will get the result in the following JSON format: dailyTotalCount: List of date and activeCount pairs, where activeCount is the number of faqs selected on date.
{
"result": {
"dailyTotalCount": [
{
"date": "DATE",
"activeCount": ACTIVE_COUNT
}
],
"state": "NORMAL",
"campaignCount": 1
},
"errors": null
}

Request Example

Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.

curl -X GET -d '{ "startDate": "2020-11-19",
"endDate": "2020-11-24"}' \
-H 'API-KEY: YOUR_API_KEY' \
https://backend.alli.ai/webapi/faq_daily_count

Response Example

{
"result": {
"dailyTotalCount": [
{
"date": "2020-11-19",
"count": 24
},
{
"date": "2020-11-20",
"count": 70
},
{
"date": "2020-11-21",
"count": 23
},
{
"date": "2020-11-22",
"count": 45
},
{
"date": "2020-11-23",
"count": 34
},
{
"date": "2020-11-24",
"count": 30
}
]
},
"errors": null
}

get
Daily FAQ Analytics

https://backend.alli.ai/webapi/faq_daily_analytics
Analytics information for the most frequently asked Q&As.
Request
Response
Request
Headers
API-KEY
required
string
Your API key can be found in your dashboard Settings menu, under the General tab.
Body Parameters
topN
required
number
Top N of the most frequently asked Q&A. Maximum value for N is 20. Please use 1, 5, 10, or 20 for N.
startDate
required
string
Start of range of dates to query in YYYY-MM-DD format.
endDate
required
string
End of range of dates to query in YYYY-MM-DD format.
Response
200: OK
You will get the result in the following JSON format: faqDailyAnalytics: List of JSON objects, each containing analytics information for one faq. totalCount: Total number of times Q&A was selected. totalShownCount: Total number of times Q&A was displayed. selectedRatio: Ratio of times Q&A was selected to times Q&A was displayed stats: List of date and selectedCount pairs where selectedCount is the number of times the faq was selected on date.
{
"result": {
"faqDailyAnalytics": [
{
"totalCount": NUMBER,
"totalShownCount": NUMBER,
"selectedRatio": NUMBER,
"faq": {
"id": "ID_1",
"question": "QUESTION_1"
},
"stats": [
{
"date": "DATE",
"selectedCount": NUMBER
}
]
}
]
},
"errors": null
}

Request Example

Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.

curl -X GET -d '{ "startDate": "2020-12-02",
"endDate": "2020-12-05", "topN": 5}' \
-H 'API-KEY: YOUR_API_KEY' \
https://backend.alli.ai/webapi/faq_daily_analytics

Response Example

{
"result": {
"faqDailyAnalytics": [
{
"totalCount": 1,
"totalShownCount": 1,
"selectedRatio": 100.0,
"faq": {
"id": "RkFROjVkZDQ4ZWFhN2E4ZGM2M2Y4OGNhZmUzOQ==",
"question": "What is Alli?"
},
"stats": [
{
"date": "2020-12-02",
"selectedCount": 0
},
{
"date": "2020-12-03",
"selectedCount": 0
},
{
"date": "2020-12-04",
"selectedCount": 1
},
{
"date": "2020-12-05",
"selectedCount": 0
}
]
}
]
},
"errors": null
}

post
Executing a Skill

https://backend.alli.ai/webapi/skill
This API executes a skill and returns the final text answer as json format. Please follow the link under the 'Learn More about Variables' below for more information about the variables parameter. This API can be used for the entity extraction if the skill is designed for the entity extraction.
Request
Response
Request
Headers
API-KEY
required
string
Your API KEY can be found in your Dashboard Settings menu under the general tab
Body Parameters
id
required
string
This is a skill id. If you click a skill in the Alli Dashboard, the URL is something like https://app.alli.ai/projects/PROJECT_ID/campaigns/SKILL_ID. Please put SKILL_ID here.
text
required
string
This is an input text for the skill execution.
variables
optional
object
variables is a JSON object to set the variables in the skill.
Response
200: OK
You will get the result as the following json format. The final text output will be returned in result. If any error happens, the error message will be included in the errors.
{"result": "TEXT RESULT FROM SKILL", "errors": []}

Learn More about Variables

To learn more about the variables in Alli, please see this user guide.

Request Example

Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.

curl -d '{"id": "YOUR SKILL ID", \
"text": "issue date", \
"variables": {"YOUR_VARIABLE": "YOUR_VARIABLE_VALUE"}}' \
-H 'API-KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' https://backend.alli.ai/webapi/skill

Response Example

{"result": "TEXT RESULT FROM SKILL", "errors": []}