Skip to content

Add Questions from Extract – KG

To add specific questions to the Knowledge graph.

Method POST
Endpoint https://{{host}}/api/public/bot/{{botId}}/faqs/bulk?language=en
Content Type application/json
Authorization auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Manage Knowledge Graph
  • Admin Console: Manage Knowledge Graph

Path Parameters

PARAMETER DESCRIPTION MANDATE
host The environment URL. For example, https://bots.kore.ai Required
BotId Bot ID or Stream ID can be accessed under General Settings on the Bot Builder. Required

Query Parameters

PARAMETER DESCRIPTION MANDATE
language The Bot language which is identified by the language acronym. For example, en for English and de for German. The user can set the default language of the bot. Required

Sample Request

curl --location 'https://bots.kore.ai/api/public/bot/botID/faqs/bulk?language=en' \
--header 'auth: {YOUR_JWT_ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data-raw '{
"faqs": [
{
"questionPayload": {
    "question": "question", //question - GET EXTRACTION QUESTION(https://developer.kore.ai/docs/bots/api-guide/get-extraction-questions-kg/)
    "tagsPayload": []
},
"answerPayload": [{
    "text": "", //answer - GET EXTRACTION QUESTION(https://developer.kore.ai/docs/bots/api-guide/get-extraction-questions-kg/)
    "type": "basic",
    "channel": "default"
}],
"knowledgeTaskId": "645e0aab1ee65252a433d457", // "_id" - GET KNOWLEDGE TASKS(https: //developer.kore.ai/docs/bots/api-guide/get-knowledgetasks-kg/)
"subQuestions": [],
"responseType": "message",
"subAnswers": [],
"streamId": "botId",
"parent": "f1324935-341d-5b0e-8551-c705a2eb58b9", //"parent" - GET KNOWLEDGE TASKS(https: //developer.kore.ai/docs/bots/api-guide/get-knowledgetasks-kg/)
"leafterm": "Botname", 
"qsId": "qna-f6014fd0-f8e8-5cb1-b952-cf9e57091ffc" // "_id" -  GET EXTRACTION QUESTION(https://developer.kore.ai/docs/bots/api-guide/get-extraction-questions-kg/)
}'

Body Parameters

PARAMETER DESCRIPTION MANDATE
faqs An array with the following parameter values:
  • questionPayload
    • question
  • answerPayload
    • text
    • type
    • channel
  • knowledgeTaskId
  • subQuestions
  • responseType
  • subAnswers
  • streamId
  • parent
  • leafterm
  • qsId
Required

Sample Response

```json { "status": "success" }