Faqs

FAQ related APIs

Select Answer

post

This method should be used to simulate a user looking up a specific FAQ

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
idstringOptional

The id of the FAQ that you would like to select

hashIdstringOptional

The id of the Q&A search return result

Responses
200

Successfully selected FAQ

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

Search from Q&A

post

This API lets you find the most relevant question and answer pairs from your Q&A knowledge base.

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
autoRegisterCandidatesbooleanOptional

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.

hashtagsOperatorstring · enumOptional

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.

Possible values:
hashtagsstring[]Optional

An array of all the hashtags that you would like to appear.

maxResultsintegerOptional

The maximum number of results to be returned.

querystringOptional

This is a query string.

formatstring · enumOptional

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.

Possible values:
Responses
200

The API will find the most relevant question and answers from your Q&A database.

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

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

Get Single Q&A

get

This is the method to get all the details of a single Q&A.

Authorizations
Query parameters
idstringRequired

The id of the FAQ you are looking for.

formatstring · enumOptional

The format of the answer value for this FAQ. Default is HTML.

Possible 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

Successfully retrieved FAQ details

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

List Q&As

get

You can list Q&As in the Knowledge Base using this API.

Authorizations
Query parameters
offsetintegerOptional

Offset allows you to specify the ranking number of the first item on the page.

Default: 0
limitintegerOptional

Limit allows you to set the number of objects returned on one page. The maximum and the default value is 1000.

Default: 1000
formatstring · enumOptional

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.

Default: htmlPossible 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

Successfully retrieved FAQs

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

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

Search Q&As

post

You can search and filter Q&As in the Knowledge Base using this API.

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
searchTermstringOptional

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.

isUsedbooleanOptional

If true, only turned-on Q&As will be listed, If false, only turned-off Q&As will.

hashtagsstring[]Optional

Hashtags to filter the list. You can add multiple hashtags.

hashtagsOperatorstring · enumOptional

If it's and, hashtags filter for multiple hashtags works with AND logic. If or, OR logic.

Possible values:
createdByAgentbooleanOptional

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.

answeredByMrcbooleanOptional

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.

autoGeneratedbooleanOptional

If true, the list will only include auto-generated Q&As. If false, only the other Q&As will be included.

editedByAgentbooleanOptional

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.

formatstring · enumOptional

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.

Possible values:
offsetintegerOptional

Offset allows you to specify the ranking number of the first item on the page.

limitintegerOptional

Limit allows you to set the number of objects returned on one page. The maximum and the default value is 1000.

Responses
200

Successfully searched FAQs

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

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

Add Q&A

post

You can add a new Q&A or update an existing Q&A using this API.

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
questionstringOptional

The question part of the Q&A.

similarQuestionsstring[]Optional

Similar questions that has the same answer.

answerstringOptional

The answer part of the Q&A. If the same question exists in the database, this answer will replace the existing one.

hashtagsstring[]Optional

Hashtags added to the Q&A.

statusstring · enumOptional

ON or OFF. When on, registered Q&A will be turned on for Q&A search.

Possible values:
memostringOptional

Memo on the Q&A to share with agents.

target_folder_idstringOptional
allowOtherAgentsViewbooleanOptional
allowOtherUsersViewbooleanOptional
Responses
200

FAQ created successfully

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

FAQ created successfully

{
  "result": {
    "status": "text",
    "id": "text"
  },
  "errors": "text"
}

Update Q&A

put

You can update an existing Q&A using this API.

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
idstringOptional

The ID of the Q&A to update.

questionstringOptional

The question part of the Q&A.

similar_questionsstring[]Optional

Similar questions that has the same answer.

answerstringOptional

The answer part of the Q&A.

hashtagsstring[]Optional

Hashtags added to the Q&A.

statusstring · enumOptional

ON or OFF. When on, Q&A will be turned on for Q&A search.

Possible values:
target_folder_idstringOptional
allowOtherAgentsViewbooleanOptional
allowOtherUsersViewbooleanOptional
Responses
200

FAQ updated successfully

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

FAQ updated successfully

{
  "result": {
    "status": "text",
    "id": "text"
  },
  "errors": "text"
}

Delete Q&A

post

You can delete a Q&A using this API.

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
idstringOptional

The ID of the Q&A you want to delete.

Responses
200

FAQ deleted successfully

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

Upload Q&As

post

You can upload multiple Q&As in the tsv, csv, xlsx, and zip format using this API.

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
filestring · binaryOptional

Your local Q&A file location. xlsx, tsv, csv, and zip files are supported.

Responses
200

FAQ file upload successful

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

Q&A Feedback

post

This API lets you give or cancel feedback given to a Q&A pair for a search query.

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

API-KEYstringRequired

Your API key can be found in your dashboard Settings menu, under the General tab.

Body
querystringRequired

The query you want to give or cancel feedback for, toward the Q&A.

idstringRequired

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.

isPositiveboolean | nullableRequired

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.

Responses
200

Feedback submitted successfully

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

Feedback submitted successfully

{
  "result": {
    "faqTrainSearchResult": {
      "faq": {
        "id": "text"
      },
      "agentFeedback": {
        "positiveCount": 1,
        "negativeCount": 1
      }
    }
  },
  "errors": {}
}

Q&A Query History

get

Returns the past Q&A Searches that have been done, both through the REST API and the Alli dashboard.

Authorizations
Query parameters
limitintegerOptional

A limit on the number of results to show (used for pagination)

offsetintegerOptional

In the list of all results, the index from which to start listing results (used for pagination)

endDatestringOptional

The latest date from which you want to get history (dates should be in the form YYYY-MM-DD)

startDatestringOptional

The earliest date from which you want to get history (dates should be in the form YYYY-MM-DD)

orderstringOptional

Can either be DESC (meaning latest queries come first), or ASC (meaning earliest queries come first)

searchTermstringOptional

The term that should have appeared in the query

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

Successful response

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

Successful response

{
  "result": {
    "histories": [
      {
        "agent": {
          "id": "text"
        },
        "question": "text",
        "answers": [
          {
            "faq": {
              "id": "text"
            },
            "effectiveConfidence": 1,
            "confidence": 1
          }
        ]
      }
    ],
    "count": 1
  },
  "errors": {}
}

Q&A Candidates

get

Using this API, you can get the list of unanswered questions from customers. They're called Candidates.

Authorizations
Query parameters
hashtagsstring[]Optional

Hashtag array if you want to limit the search scope to the given hashtags

searchTermstringOptional

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.

orderstringOptional

How to order the candidates. You can use ATTRIBUTE_[DESC or ASC] format. ATTRIBUTE can be FREQUENCY or CREATED_AT.

statestringOptional

Status of the candidates to see. It can be ALL or ACTIVE or ARCHIVED.

offsetintegerOptional

offset allows you to specify the ranking number of the first item on the page.

limitintegerOptional

limit allows you to set the number of objects returned on one page. The maximum value is 100.

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

Successful response

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

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 FAQ Count

get

Daily trend of Q&A from FAQ in given date 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 FAQ count

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

Successfully retrieved daily FAQ count

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

Daily FAQ Analytics

get

Analytics information for the most frequently asked Q&As.

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
topNintegerOptional

Top N of the most frequently asked Q&A. Maximum value for N is 20. Please use 1, 5, 10, or 20 for N.

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 FAQ analytics

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

Successfully retrieved FAQ analytics

{
  "result": {
    "faqDailyAnalytics": [
      {
        "totalCount": 1,
        "totalShownCount": 1,
        "selectedRatio": 1,
        "faq": {
          "id": "text",
          "question": "text"
        },
        "stats": [
          {
            "date": "text",
            "selectedCount": 1
          }
        ]
      }
    ]
  },
  "errors": {}
}

Q&A Candidates

post

Registers a new Q&A Candidate with the system.

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
queriesstring[]Required

The list of all queries you would like to register

Responses
200

Candidates registered successfully

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

Candidates registered successfully

{
  "result": {
    "candidates": [
      {
        "id": "text"
      }
    ]
  },
  "errors": {}
}

Was this helpful?