Faqs

FAQ related APIs

回答を選択

post

特定の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

選択したいQ&AのID

hashIdstringOptional

Q&A検索結果のID

Responses
200

選択されたQ&A

application/json
post
POST /webapi/faq/select_answer HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "id": "text",
  "hashId": "text"
}
{
  "result": "text"
}

Q&Aから検索

post

このAPIを使用すると、Q&Aナレッジベースから最も関連性の高い質問と回答のペアを見つけることができます。

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

デフォルト値はtrueです。このオプションをfalseに設定すると、指定されたクエリに対して答えがない場合、自動的にQ&A登録候補にクエリが登録されません。

hashtagsOperatorstring · enumOptional

ANDまたはORのいずれかを選択します。
すべてのハッシュタグを含む結果を返したい場合はANDを選択します。
少なくとも1つのハッシュタグを含む結果を返したい場合はORを選択します。

Possible values:
hashtagsstring[]Optional

表示したいすべてのハッシュタグの配列。

maxResultsintegerOptional

返される結果の最大数。

querystringOptional

質問内容。

formatstring · enumOptional

html またはテキストの場合。テキストの場合、返り値はプレーンテキストになります。html の場合、html を返します。異なるフォントサイズや色などのスタイルがある html を使用する場合、html を使用できます。単にテキストとして答えを得たい場合は、テキストを使用できます。デフォルト値は html です。

Possible values:
Responses
200

APIは、Q&Aデータから最も関連性の高い質問と回答を見つけます。

application/json
post
POST /webapi/faq HTTP/1.1
Host: backend-ja.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

APIは、Q&Aデータから最も関連性の高い質問と回答を見つけます。

{
  "result": [
    {
      "confidence": 1,
      "effectiveConfidence": 1,
      "question": "text",
      "answer": "text",
      "id": "text",
      "hashtags": [
        "text"
      ],
      "lastUpdatedDate": "2025-08-16",
      "agentFeedback": {
        "positiveCount": 1,
        "negativeCount": 1
      },
      "userFeedback": {
        "positiveCount": 1,
        "negativeCount": 1
      }
    }
  ],
  "count": 1,
  "hashId": "text"
}

シングルQ&Aを取得

get

シングル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

FAQの詳細を正常に取得しました。

application/json
get
GET /webapi/single_faq HTTP/1.1
Host: backend-ja.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-16",
    "createdDate": "2025-08-16",
    "hashtags": [
      "text"
    ],
    "statusOnAt": "2025-08-16T20:45:39.919Z",
    "statusOffAt": "2025-08-16T20:45:39.919Z",
    "folder": "text",
    "agentEditor": [
      "text"
    ],
    "agentViewer": [
      "text"
    ],
    "allowOtherAgentsView": true,
    "allowOtherUsersView": true
  }
}

Q&Aを一覧表示する

get

ナレッジベースのQ&Aを一覧表示できます。

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

OK

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

OK

{
  "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-16",
      "createdDate": "2025-08-16"
    }
  ]
}

Q&Aを検索する

post

ナレッジベース内のQ&Aの検索およびフィルタリングができます。

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

リストをフィルターするためのキーワード検索クエリ。以下の方法で高度な検索が可能です。を使用できます。ANDの場合は"TERM1 TERM2"、ORの場合は"TERM1 OR TERM2"、完全一致の場合は"TERM"を使用します。

isUsedbooleanOptional

Trueの場合、有効になっているQ&Aのみが一覧表示されます。Falseの場合、無効になっているQ&Aのみが一覧表示されます。

hashtagsstring[]Optional

リストをフィルタリングするためのハッシュタグ。複数のハッシュタグを追加できます。

hashtagsOperatorstring · enumOptional

「AND」の場合、ハッシュタグのフィルターは複数のハッシュタグに対してANDロジックで機能します。「OR」の場合、ORロジックで機能します。

Possible values:
createdByAgentbooleanOptional

Trueの場合、リストには管理者によって作成されたQ&Aのみが含まれます。Falseの場合、他のQ&Aのみが含まれます。createdByAgent、answeredByMrc、autoGenerated、editedByAgentのフィルターは相互排他であり、それらのうち2つ以上が使用される場合はORロジックが適用されます。

answeredByMrcbooleanOptional

正しければ、リストにはアップロードされたドキュメントから自動的に抽出された回答のみが含まれるQ&Aが含まれます。間違っていれば、その他のQ&Aのみが含まれます。

autoGeneratedbooleanOptional

Trueの場合、リストには自動生成されたQ&Aのみが含まれます。Falseの場合、他のQ&Aのみが含まれます。

editedByAgentbooleanOptional

Trueの場合、リストには登録後にエージェントによって編集されたQ&Aのみが含まれます。Falseの場合、他のQ&Aのみが含まれます。

formatstring · enumOptional

回答に異なるフォントサイズや文字色などのスタイル付きHTMLが含まれている場合、HTML形式で取得することでスタイルが反映された回答を得ることができます。スタイルなしのプレーンなテキストとして回答を取得したい場合は、テキスト形式を使用できます。デフォルト値はHTMLです。

Possible values:
offsetintegerOptional

オフセットを使用すると、ページ上の最初の項目の順位番号を指定できます。

limitintegerOptional

1ページに返されるオブジェクトの数を設定します。最大値およびデフォルト値は1000です。

Responses
200

OK

application/json
post
POST /webapi/faqs HTTP/1.1
Host: backend-ja.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

OK

{
  "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-16",
      "createdDate": "2025-08-16"
    }
  ]
}

Q&Aを追加

post

新規のQ&Aの追加や既存のQ&Aの更新ができます。

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

Q&Aの質問部分

similarQuestionsstring[]Optional

類似質問

answerstringOptional

Q&Aの答えの部分です。同じ質問が既にナレッジベースにに存在する場合、答えが置き換えられます。

hashtagsstring[]Optional

Q&Aにハッシュタグを追加します。

statusstring · enumOptional

Q&AのON/OFFを設定します。ONにすると、登録したQ&Aが有効になります。

Possible values:
memostringOptional

Q&Aのメモ

target_folder_idstringOptional
allowOtherAgentsViewbooleanOptional
allowOtherUsersViewbooleanOptional
Responses
200

OK

application/json
post
POST /webapi/register_faq HTTP/1.1
Host: backend-ja.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

OK

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

Q&Aの更新

put

既存のQ&Aを更新できます。

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

更新するQ&AのID

questionstringOptional

Q&Aの質問部分

similar_questionsstring[]Optional

類似質問

answerstringOptional

Q&Aの答えの部分

hashtagsstring[]Optional

Q&Aにハッシュタグを追加

statusstring · enumOptional

Q&AのON/OFFを切り替えます。ONにすると、Q&Aが有効になります。

Possible values:
target_folder_idstringOptional
allowOtherAgentsViewbooleanOptional
allowOtherUsersViewbooleanOptional
Responses
200

OK

application/json
put
PUT /webapi/register_faq HTTP/1.1
Host: backend-ja.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

OK

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

Q&Aを削除

post

このAPIを使用してQ&Aを削除できます。

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

削除したいQ&AのID。

Responses
200

FAQが正常に削除されました。

application/json
post
POST /webapi/delete_faq HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 13

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

Q&Aをアップロードする

post

このAPIを使用することで、tsv、csv、xlsx、zip形式で複数のQ&Aをアップロードすることができます。

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

ローカルに保存されているQ&Aファイルの場所。xlsx、tsv、csv、およびzipファイルがサポートされています。

Responses
200

FAQファイルのアップロードに成功しました。

application/json
post
POST /webapi/upload_faq_file HTTP/1.1
Host: backend-ja.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-ja.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 クエリ履歴

get

過去に行われたQ&A検索の履歴を、REST APIおよびAlliダッシュボードを通じて参照します。

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

正常に取得されました。

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

正常に取得されました。

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

Q&Aの候補を取得する

get

このAPIを使用すると、ナレッジベースの未回答の質問リストを取得できます。対象のQ&AははQ&A登録候補(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

正常に取得しました。

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

正常に取得しました。

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

デイリーFAQ件数

get

特定の日付範囲における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
startDatestringOptional

照会する日付範囲の終了日をYYYY-MM-DD形式で指定します。

endDatestringOptional

照会する日付範囲の終了日をYYYY-MM-DD形式で指定します。

Responses
200

日毎のFAQ検索件数を正常に取得しました。

application/json
get
GET /webapi/faq_daily_count HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "startDate": "text",
  "endDate": "text"
}
200

日毎のFAQ検索件数を正常に取得しました。

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

日毎のFAQ分析

get

最も頻繁に質問されるQ&Aの分析情報。

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

最も頻繁に質問されるQ&Aの上位N。Nの最大値は20です。Nには1、5、10、または20を使用してください。

startDatestringOptional

クエリする日付範囲の開始をYYYY-MM-DD形式で指定します。

endDatestringOptional

YYYY-MM-DD形式でクエリを行う日付範囲の終了。

Responses
200

FAQアナリティクスの取得に成功しました。

application/json
get
GET /webapi/faq_daily_analytics HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "topN": 1,
  "startDate": "text",
  "endDate": "text"
}
200

FAQアナリティクスの取得に成功しました。

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

Q&A候補者

post

システムに新しいQ&A候補者を登録します。

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

登録したいすべてのクエリのリスト

Responses
200

候補者が正常に登録されました。

application/json
post
POST /webapi/add_faq_candidates HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "queries": [
    "text"
  ]
}
200

候補者が正常に登録されました。

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

Was this helpful?