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/
post
https://backend.alli.ai
/webapi/start_conversation
Start Conversation

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.
1
curl -L -X POST 'https://backend.alli.ai/webapi/start_conversation' \
2
-H 'API-KEY: YOUR_API_KEY' \
3
-H 'OWN-USER-ID: test_userid' \
4
-H 'Content-Type: application/json' \
5
--data-raw '{"placement": "skill_A"}'
Copied!

Response Example

1
{
2
"result": {
3
"conversation": {
4
"id": "Q29udmVyc2F0aW9uOjYwMDZiNTM3MmRhPHAwMjZlOTFjMjllZQ==",
5
"project": {
6
"nluLanguage": "EN"
7
},
8
"chats": {
9
"edges": [
10
{
11
"node": {
12
"id": "Q2hhdDo2MDQ2YjUzNzJkYWQwMDI2ZTkxYzI5ZDE=",
13
"message": "{\"blocks\": [{\"key\": \"egkjj\", \"text\": \"Please select an option\", \"type\": \"unstyled\", \"depth\": 0, \"inlineStyleRanges\": [], \"entityRanges\": [], \"data\": {}}], \"entityMap\": {}}",
14
"createdAt": 1615246647609.666,
15
"chatOptionInfos": [
16
{
17
"shortenOption": "FAQ",
18
"longOption": "FAQ",
19
"style": {
20
"bgColor": "#FFFFFF",
21
"bold": false,
22
"fontColor": "#2074ff",
23
"italic": false,
24
"lineColor": "#2074ff",
25
"underline": false
26
},
27
"meta": ""
28
},
29
{
30
"shortenOption": "Document",
31
"longOption": "Document",
32
"style": {
33
"bgColor": "#FFFFFF",
34
"bold": false,
35
"fontColor": "#2074ff",
36
"italic": false,
37
"lineColor": "#2074ff",
38
"underline": false
39
},
40
"meta": ""
41
}
42
],
43
"isDeleted": false
44
}
45
}
46
]
47
}
48
}
49
},
50
"errors": null
51
}
Copied!
post
https://backend.alli.ai
/webapi/send_chat
Send Chat

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.
1
curl -L -X POST 'https://backend.alli.ai/webapi/send_chat' \
2
-H 'api-key: YOUR_API_KEY' \
3
-H 'Content-Type: application/json' \
4
--data-raw '{"conversationId": "Q29udmVyc2F0aW9uOjYwNDZiNWNkZTZkZGQ5MGE3ZWJlMGYxZQ==", "message": "I need help!"}'
Copied!

Response Example

1
{
2
"result": {
3
"responses": [
4
{
5
"id": "Q2hhdDo2MDQ2YjVlY2U2ZGRkOTBhN2ViZTBmNTU=",
6
"message": "I need help!",
7
"createdAt": 1615246828077.0,
8
"isDeleted": false
9
},
10
{
11
"id": "Q2hhdDo2MDQ2YjVlY2U2ZGRkOTBhN2ViZTBmNTc=",
12
"message": "{\"blocks\": [{\"key\": \"6so0p\", \"text\": \"Please input your question\", \"type\": \"unstyled\", \"depth\": 0, \"inlineStyleRanges\": [], \"entityRanges\": [], \"data\": {}}], \"entityMap\": {}}",
13
"createdAt": 1615246828110.0,
14
"chatOptionInfos": [],
15
"isDeleted": false
16
}
17
],
18
"state": "WAIT_USER_ANSWER_2"
19
},
20
"errors": null
21
}
Copied!
get
https://backend.alli.ai
/webapi/summary_analytics
Summary Analytics

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.
1
curl -X GET -d '{ "startDate": "2020-11-14",
2
"endDate": "2020-12-14"}' \
3
-H 'API-KEY: YOUR_API_KEY' \
4
https://backend.alli.ai/webapi/summary_analytics
Copied!

Response Example

1
{
2
"result": {
3
"conversations": 45,
4
"conversationsUpDown": -45.78,
5
"participants": 44,
6
"participantsUpDown": -32.31,
7
"uniqueParticipants": 43,
8
"uniqueParticipantsUpDown": -31.75,
9
"queries": 39,
10
"queriesUpDown": -56.18,
11
"queriedUsers": 35,
12
"queriedUsersUpDown": -46.97,
13
"uniqueQueriedUsers": 35,
14
"uniqueQueriedUsersUpDown": -44.44,
15
"instantResolution": 1,
16
"instantResolutionUpDown": 0.0,
17
"aiResponseRate": 100.0,
18
"aiResponseRateUpDown": 0.0,
19
"uniqueVisitors": 2077,
20
"uniqueVisitorsUpDown": -1.05,
21
"totalFaqs": 0,
22
"totalFaqsUpDown": 0.0,
23
"totalDocuments": 0,
24
"totalDocumentsUpDown": 0.0,
25
"feedbacksUpDown": 0.0
26
},
27
"errors": null
28
}
Copied!
get
https://backend.alli.ai
/webapi/conversation_daily_count
Daily Conversation Count

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.
1
curl -X GET -d '{ "startDate": "2020-11-19",
2
"endDate": "2020-11-24"}' \
3
-H 'API-KEY: YOUR_API_KEY' \
4
https://backend.alli.ai/webapi/conversation_daily_count
Copied!

Response Example

1
{
2
"result": {
3
"dailyTotalCount": [
4
{
5
"date": "2020-11-19",
6
"activeCount": 30
7
},
8
{
9
"date": "2020-11-20",
10
"activeCount": 49
11
},
12
{
13
"date": "2020-11-21",
14
"activeCount": 32
15
},
16
{
17
"date": "2020-11-22",
18
"activeCount": 2
19
},
20
{
21
"date": "2020-11-23",
22
"activeCount": 31
23
},
24
{
25
"date": "2020-11-24",
26
"activeCount": 16
27
}
28
],
29
"state": "NORMAL",
30
"campaignCount": 1
31
},
32
"errors": null
33
}
Copied!
get
https://backend.alli.ai
/webapi/faq_daily_count
Daily FAQ Count

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.
1
curl -X GET -d '{ "startDate": "2020-11-19",
2
"endDate": "2020-11-24"}' \
3
-H 'API-KEY: YOUR_API_KEY' \
4
https://backend.alli.ai/webapi/faq_daily_count
Copied!

Response Example

1
{
2
"result": {
3
"dailyTotalCount": [
4
{
5
"date": "2020-11-19",
6
"count": 24
7
},
8
{
9
"date": "2020-11-20",
10
"count": 70
11
},
12
{
13
"date": "2020-11-21",
14
"count": 23
15
},
16
{
17
"date": "2020-11-22",
18
"count": 45
19
},
20
{
21
"date": "2020-11-23",
22
"count": 34
23
},
24
{
25
"date": "2020-11-24",
26
"count": 30
27
}
28
]
29
},
30
"errors": null
31
}
Copied!
get
https://backend.alli.ai
/webapi/faq_daily_analytics
Daily FAQ Analytics

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.
1
curl -X GET -d '{ "startDate": "2020-12-02",
2
"endDate": "2020-12-05", "topN": 5}' \
3
-H 'API-KEY: YOUR_API_KEY' \
4
https://backend.alli.ai/webapi/faq_daily_analytics
Copied!

Response Example

1
{
2
"result": {
3
"faqDailyAnalytics": [
4
{
5
"totalCount": 1,
6
"totalShownCount": 1,
7
"selectedRatio": 100.0,
8
"faq": {
9
"id": "RkFROjVkZDQ4ZWFhN2E4ZGM2M2Y4OGNhZmUzOQ==",
10
"question": "What is Alli?"
11
},
12
"stats": [
13
{
14
"date": "2020-12-02",
15
"selectedCount": 0
16
},
17
{
18
"date": "2020-12-03",
19
"selectedCount": 0
20
},
21
{
22
"date": "2020-12-04",
23
"selectedCount": 1
24
},
25
{
26
"date": "2020-12-05",
27
"selectedCount": 0
28
}
29
]
30
}
31
]
32
},
33
"errors": null
34
}
Copied!
post
https://backend.alli.ai
/webapi/skill
Executing a Skill

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.
1
curl -d '{"id": "YOUR SKILL ID",
2
"text": "issue date",
3
"variables": {"YOUR_VARIABLE": "YOUR_VARIABLE_VALUE"}}' \
4
-H 'API-KEY: YOUR_API_KEY' \
5
-H 'Content-Type: application/json' https://backend.alli.ai/webapi/skill
Copied!

Response Example

1
{"result": "TEXT RESULT FROM SKILL", "errors": []}
Copied!
Last modified 1mo ago