Alli Answer API
Alli Answer 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.
post
https://backend.alli.ai
/webapi/start_conversation
Start Conversation
Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.
curl -L -X POST 'https://backend.alli.ai/webapi/start_conversation' \
-H 'API-KEY: YOUR_API_KEY' \
-H 'OWN-USER-ID: test_userid' \
-H 'Content-Type: application/json' \
--data-raw '{"placement": "skill_A"}'
{
"result": {
"conversation": {
"id": "Q29udmVyc2F0aW9uOjYwMDZiNTM3MmRhPHAwMjZlOTFjMjllZQ==",
"project": {
"nluLanguage": "EN"
},
"chats": {
"edges": [
{
"node": {
"id": "Q2hhdDo2MDQ2YjUzNzJkYWQwMDI2ZTkxYzI5ZDE=",
"message": "{\"blocks\": [{\"key\": \"egkjj\", \"text\": \"Please select an option\", \"type\": \"unstyled\", \"depth\": 0, \"inlineStyleRanges\": [], \"entityRanges\": [], \"data\": {}}], \"entityMap\": {}}",
"createdAt": 1615246647609.666,
"chatOptionInfos": [
{
"shortenOption": "FAQ",
"longOption": "FAQ",
"style": {
"bgColor": "#FFFFFF",
"bold": false,
"fontColor": "#2074ff",
"italic": false,
"lineColor": "#2074ff",
"underline": false
},
"meta": ""
},
{
"shortenOption": "Document",
"longOption": "Document",
"style": {
"bgColor": "#FFFFFF",
"bold": false,
"fontColor": "#2074ff",
"italic": false,
"lineColor": "#2074ff",
"underline": false
},
"meta": ""
}
],
"isDeleted": false
}
}
]
}
}
},
"errors": null
}
post
https://backend.alli.ai
/webapi/end_conversation_by_agent
End conversation by agent
curl -L -X POST 'https://backend.alli.ai/webapi/end_conversation_by_agent' \
-H 'api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data-raw '{"id": "Q29udmVyc2F0aW9uOjYxYTcwMzAxMjYzZWM2NmI2MDY0NzVjOQ=="}'
{
"result":{
"conversation":{
"id":"Q29udmVyc2F0aW9uOjYxYTcwMzAxMjYzZWM2NmI2MDY0NzVjOQ==",
"completedTime":1639093180790.565,
"state":"END_BY_AGENT",
"__typename":"Conversation"
},
"__typename":"UpdateConversationState"
},
"errors":null
}
post
https://backend.alli.ai
/webapi/send_chat
Send Chat
Please replace YOUR_API_KEY with your one in the example below. To get the api key, please see getting-api-key section.
curl -L -X POST 'https://backend.alli.ai/webapi/send_chat' \
-H 'api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data-raw '{"conversationId": "Q29udmVyc2F0aW9uOjYwNDZiNWNkZTZkZGQ5MGE3ZWJlMGYxZQ==", "message": "I need help!"}'
{
"result": {
"responses": [
{
"id": "Q2hhdDo2MDQ2YjVlY2U2ZGRkOTBhN2ViZTBmNTU=",
"message": "I need help!",
"createdAt": 1615246828077.0,
"isDeleted": false
},
{
"id": "Q2hhdDo2MDQ2YjVlY2U2ZGRkOTBhN2ViZTBmNTc=",
"message": "{\"blocks\": [{\"key\": \"6so0p\", \"text\": \"Please input your question\", \"type\": \"unstyled\", \"depth\": 0, \"inlineStyleRanges\": [], \"entityRanges\": [], \"data\": {}}], \"entityMap\": {}}",
"createdAt": 1615246828110.0,
"chatOptionInfos": [],
"isDeleted": false,
"knowledgeBasePreview": {
"previewUrl": "https://www.alli.ai/projects/UHJvamVjdDo1ZDUyYjY3N2NkMGI4MjU5Y2Q1MmY5N2E=/knowledgeBases/S25vd2xlZGdlQmFzZTo2MjA5MWY4M2VhM2U5NjM2NTJmZjc2YzU=/preview?page=9&highlight_indexes=null&highlights=%7B%22indexes%22%3Anull%2C%22pageIndexes%22%3A%5B%7B%22page%22%3A9%2C%22indexes%22%3A%5B7%2C8%2C9%2C10%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C23%2C24%2C25%2C26%2C27%2C28%2C29%2C30%2C32%2C33%2C35%2C36%2C7%2C8%2C9%2C10%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C23%2C24%2C25%2C26%2C27%2C28%2C29%2C30%2C32%2C33%2C35%2C36%5D%7D%5D%7D"
}
}
],
"state": "WAIT_USER_ANSWER_2"
},
"errors": null
}
get
https://backend.alli.ai
/webapi/summary_analytics
Summary Analytics
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
{
"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
https://backend.alli.ai
/webapi/conversation_daily_count
Daily Conversation Count
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
{
"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
https://backend.alli.ai
/webapi/faq_daily_count
Daily FAQ Count
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
{
"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
https://backend.alli.ai
/webapi/faq_daily_analytics
Daily FAQ Analytics
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
{
"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
https://backend.alli.ai
/webapi/skill
Executing a Skill
Please replace YOUR_API_KEY with your SDK Key in the example below. This API requires the use of the SDK key instead of the api key. Please see getting-api-key section as it is in the same location.
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
{"result": "TEXT RESULT FROM SKILL", "errors": []}
View the API classifications and mapping for billing purposes.
Last modified 1mo ago