---
title: "Replace knowledgebase contents."
method: PUT
path: "/knowledgebases/{kbId}"
tags: ["Knowledgebases"]
---

# Replace knowledgebase contents.

`PUT /knowledgebases/{kbId}`

## Path parameters

- `kbId` string, required

## Request body

- ReplaceKbDTO — Post body schema for Replace KB operation.
  - `qnAList` QnADTO[], required — List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.
    - `id` integer — Unique id for the Q-A.
    - `answer` string, required — Answer text
    - `source` string — Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs
    - `questions` string[], required — List of questions associated with the answer.
    - `metadata` MetadataDTO[] — List of metadata associated with the answer.
      - `name` string, required — Metadata name.
      - `value` string, required — Metadata value.
    - `context` ContextDTO — Context associated with Qna.
      - `isContextOnly` boolean — To mark if a prompt is relevant only with a previous question or not. true - Do not include this QnA as search result for queries without context false - ignores context and includes this QnA in search result
      - `prompts` PromptDTO[] — List of prompts associated with the answer.
        - `displayOrder` integer — Index of the prompt - used in ordering of the prompts
        - `qnaId` integer — Qna id corresponding to the prompt - if QnaId is present, QnADTO object is ignored.
        - `qna` QnADTO — recursive
        - `displayText` string — Text displayed to represent a follow up question prompt

## Response `204`

HTTP 204 No content.

## Other responses

- `default` — Error response.

---

[API](https://skmtc.net/azure/apis/qnamaker-client.md) · [All operations](https://skmtc.net/azure/apis/qnamaker-client/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/qnamaker-client/versions/75b50ce22fbe/schema)
