Faqs
FAQ related APIs
This method should be used to simulate a user looking up a specific FAQ
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 FAQ that you would like to select
The id of the Q&A search return result
Successfully selected FAQ
In case you provide an invalid FAQ
POST /webapi/faq/select_answer HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"id": "text",
"hashId": "text"
}
{
"result": "text"
}
This API lets you find the most relevant question and answer pairs from your Q&A knowledge base.
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 default value is true. When this option has set false, it'll not automatically register the query to candidates when there was no answer for the given query.
Either AND or OR. Choose AND if you want each returned result to contain all hashtags. Choose OR if you want each returned result to contain at least one of the hashtags.
An array of all the hashtags that you would like to appear.
The maximum number of results to be returned.
This is a query string.
html or text. If it's text, the return value will be in plain text. If it's html, it will return html. If your answer contains styled html, such as different font size and color, you can use html. If you simply want to get an answer as a text, you can use the text. The default value is html.
The API will find the most relevant question and answers from your Q&A database.
POST /webapi/faq HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"autoRegisterCandidates": true,
"hashtagsOperator": "AND",
"hashtags": [
"text"
],
"maxResults": 1,
"query": "text",
"format": "html"
}
The API will find the most relevant question and answers from your Q&A database.
{
"result": [
{
"confidence": 1,
"effectiveConfidence": 1,
"question": "text",
"answer": "text",
"id": "text",
"hashtags": [
"text"
],
"lastUpdatedDate": "2025-08-14",
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
],
"count": 1,
"hashId": "text"
}
This is the method to get all the details of a single Q&A.
The id of the FAQ you are looking for.
The format of the answer value for this FAQ. Default is HTML.
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
Successfully retrieved FAQ details
FAQ not found
GET /webapi/single_faq HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
"result": {
"question": "text",
"similar_questions": [
"text"
],
"answer": "text",
"id": "text",
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"lastUpdatedDate": "2025-08-14",
"createdDate": "2025-08-14",
"hashtags": [
"text"
],
"statusOnAt": "2025-08-14T14:43:23.010Z",
"statusOffAt": "2025-08-14T14:43:23.010Z",
"folder": "text",
"agentEditor": [
"text"
],
"agentViewer": [
"text"
],
"allowOtherAgentsView": true,
"allowOtherUsersView": true
}
}
You can list Q&As in the Knowledge Base using this API.
Offset allows you to specify the ranking number of the first item on the page.
0
Limit allows you to set the number of objects returned on one page. The maximum and the default value is 1000.
1000
If your answers contain styled html, such as different font size or color, you can use html to get answers in html format. If you simply want to get answers as a text, you can use the text.
html
Possible values: 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
Successfully retrieved FAQs
GET /webapi/faqs HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
Successfully retrieved FAQs
{
"offset": 1,
"count": 1,
"total_count": 1,
"results": [
{
"id": "text",
"question": "text",
"answer": "text",
"hashtags": [
"text"
],
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"lastUpdatedDate": "2025-08-14",
"createdDate": "2025-08-14"
}
]
}
You can search and filter Q&As in the Knowledge Base using this API.
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
Keyword search query to filter the list. You can use operators to run advanced searches. "TERM1 TERM2" for AND, "TERM1 OR TERM2" for OR, and "TERM" for exact match.
If true, only turned-on Q&As will be listed, If false, only turned-off Q&As will.
Hashtags to filter the list. You can add multiple hashtags.
If it's and, hashtags filter for multiple hashtags works with AND logic. If or, OR logic.
If true, the list will only include Q&As created by agents. If false, only the other Q&As will be included. Please note that createdByAgent, answeredByMrc, autoGenerated, editedByAgent filters are mutually exclusive, and OR logic is applied if two or more of them are used.
If true, the list will only include Q&As that are the answers are automatically extracted from uploaded Documents. If false, only the other Q&As will be included.
If true, the list will only include auto-generated Q&As. If false, only the other Q&As will be included.
If true, the list will only include Q&A's edited by any agent after registered. If false, only the other Q&As will be included.
If your answers contain styled html, such as different font size or color, you can use html to get answers in html format. If you simply want to get answers as a text, you can use the text. The default value is html.
Offset allows you to specify the ranking number of the first item on the page.
Limit allows you to set the number of objects returned on one page. The maximum and the default value is 1000.
Successfully searched FAQs
POST /webapi/faqs HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 202
{
"searchTerm": "text",
"isUsed": true,
"hashtags": [
"text"
],
"hashtagsOperator": "and",
"createdByAgent": true,
"answeredByMrc": true,
"autoGenerated": true,
"editedByAgent": true,
"format": "html",
"offset": 1,
"limit": 1
}
Successfully searched FAQs
{
"offset": 1,
"count": 1,
"total_count": 1,
"results": [
{
"id": "text",
"question": "text",
"answer": "text",
"hashtags": [
"text"
],
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"lastUpdatedDate": "2025-08-14",
"createdDate": "2025-08-14"
}
]
}
You can add a new Q&A or update an existing Q&A using this API.
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 question part of the Q&A.
Similar questions that has the same answer.
The answer part of the Q&A. If the same question exists in the database, this answer will replace the existing one.
Hashtags added to the Q&A.
ON or OFF. When on, registered Q&A will be turned on for Q&A search.
Memo on the Q&A to share with agents.
FAQ created successfully
POST /webapi/register_faq HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 192
{
"question": "text",
"similarQuestions": [
"text"
],
"answer": "text",
"hashtags": [
"text"
],
"status": true,
"memo": "text",
"target_folder_id": "text",
"allowOtherAgentsView": true,
"allowOtherUsersView": true
}
FAQ created successfully
{
"result": {
"status": "text",
"id": "text"
},
"errors": "text"
}
You can update an existing Q&A using this API.
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 Q&A to update.
The question part of the Q&A.
Similar questions that has the same answer.
The answer part of the Q&A.
Hashtags added to the Q&A.
ON or OFF. When on, Q&A will be turned on for Q&A search.
FAQ updated successfully
PUT /webapi/register_faq HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 191
{
"id": "text",
"question": "text",
"similar_questions": [
"text"
],
"answer": "text",
"hashtags": [
"text"
],
"status": true,
"target_folder_id": "text",
"allowOtherAgentsView": true,
"allowOtherUsersView": true
}
FAQ updated successfully
{
"result": {
"status": "text",
"id": "text"
},
"errors": "text"
}
You can delete a Q&A using this API.
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 Q&A you want to delete.
FAQ deleted successfully
FAQ not found
POST /webapi/delete_faq HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"id": "text"
}
{
"result": {
"status": "text"
},
"errors": "text"
}
You can upload multiple Q&As in the tsv, csv, xlsx, and zip format using this API.
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
Your local Q&A file location. xlsx, tsv, csv, and zip files are supported.
FAQ file upload successful
Invalid parameters
POST /webapi/upload_faq_file HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}
{
"result": "text",
"notUploaded": [
{
"question": "text",
"state": "text"
}
]
}
This API lets you give or cancel feedback given to a Q&A pair for a search query.
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
Your API key can be found in your dashboard Settings menu, under the General tab.
The query you want to give or cancel feedback for, toward the Q&A.
The ID for the Q&A you want to give or cancel feedback for the query. It is created whenever a Q&A search happens and bound to the query and the Q&A pair. It can be retrieved using the Q&A API above.
When the value is true, positive feedback is given to the Q&A for the query. When it's false, negative feedback is given. When it's null, it cancels the feedback.
Feedback submitted successfully
POST /webapi/faq_feedback HTTP/1.1
Host: backend.alli.ai
API-KEY: text
Content-Type: application/json
Accept: */*
Content-Length: 46
{
"query": "text",
"id": "text",
"isPositive": true
}
Feedback submitted successfully
{
"result": {
"faqTrainSearchResult": {
"faq": {
"id": "text"
},
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
},
"errors": {}
}
Returns the past Q&A Searches that have been done, both through the REST API and the Alli dashboard.
A limit on the number of results to show (used for pagination)
In the list of all results, the index from which to start listing results (used for pagination)
The latest date from which you want to get history (dates should be in the form YYYY-MM-DD)
The earliest date from which you want to get history (dates should be in the form YYYY-MM-DD)
Can either be DESC (meaning latest queries come first), or ASC (meaning earliest queries come first)
The term that should have appeared in the query
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
Successful response
GET /webapi/faq_histories HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
Successful response
{
"result": {
"histories": [
{
"agent": {
"id": "text"
},
"question": "text",
"answers": [
{
"faq": {
"id": "text"
},
"effectiveConfidence": 1,
"confidence": 1
}
]
}
],
"count": 1
},
"errors": {}
}
Using this API, you can get the list of unanswered questions from customers. They're called Candidates.
Hashtag array if you want to limit the search scope to the given hashtags
Search query to filter the candidates to see. You can use operators to run advanced searches. "TERM1 TERM2" for AND, "TERM1 OR TERM2" for OR, and "TERM" for exact match.
How to order the candidates. You can use ATTRIBUTE_[DESC or ASC] format. ATTRIBUTE can be FREQUENCY or CREATED_AT.
Status of the candidates to see. It can be ALL or ACTIVE or ARCHIVED.
offset allows you to specify the ranking number of the first item on the page.
limit allows you to set the number of objects returned on one page. The maximum value is 100.
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
Successful response
GET /webapi/faq_candidates HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
Successful response
{
"result": {
"faqCandidates": [
{
"id": "text",
"frequency": 1,
"textAnswer": "text",
"state": "text",
"createdAt": 1,
"questions": [
{
"id": "text",
"question": "text",
"frequency": 1,
"history": {
"id": "text"
}
}
]
}
],
"count": 1
},
"errors": {}
}
Daily trend of Q&A from FAQ in given date 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 FAQ count
GET /webapi/faq_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 FAQ count
{
"result": {
"dailyTotalCount": [
{
"date": "text",
"count": 1
}
],
"state": "text",
"campaignCount": 1
},
"errors": {}
}
Analytics information for the most frequently asked Q&As.
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
Top N of the most frequently asked Q&A. Maximum value for N is 20. Please use 1, 5, 10, or 20 for N.
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 FAQ analytics
GET /webapi/faq_daily_analytics HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 46
{
"topN": 1,
"startDate": "text",
"endDate": "text"
}
Successfully retrieved FAQ analytics
{
"result": {
"faqDailyAnalytics": [
{
"totalCount": 1,
"totalShownCount": 1,
"selectedRatio": 1,
"faq": {
"id": "text",
"question": "text"
},
"stats": [
{
"date": "text",
"selectedCount": 1
}
]
}
]
},
"errors": {}
}
Registers a new Q&A Candidate with the system.
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 list of all queries you would like to register
Candidates registered successfully
POST /webapi/add_faq_candidates HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"queries": [
"text"
]
}
Candidates registered successfully
{
"result": {
"candidates": [
{
"id": "text"
}
]
},
"errors": {}
}
Was this helpful?