> For the complete documentation index, see [llms.txt](https://developer.acquire.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.acquire.io/rest-apis/chatbot/conversational-bot/question-and-answer/add.md).

# Add

## Add QnA

<mark style="color:green;">`POST`</mark> `https://{{account_id}}.acquire.io/api/v1/bot/qna`

Create a new QnA. The body must contain the following parameters: \
\
qnaGroupId - The ID of the group the QnA will be added to. \
\
qnaMainQuestions - An array of objects. Each question object must have a key of "question" with a value of the question you intend to add. Questions may be separated by a comma. \
\
qnaMainAnswers -  An array of objects. Each answer object must have a key of "answer" with a value of the answer you intend to add. Answers may be separated by a comma. \
\
qnaMainActions - An array with a single object. Must have the keys "actionType" and "actionVal".&#x20;

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | Bearer {{api\_key}} |

#### Request Body

| Name             | Type    | Description                                                    |
| ---------------- | ------- | -------------------------------------------------------------- |
| qnaMainActions   | array   | Array of objects.                                              |
| qnaMainAnswers   | array   | Array of objects. Each answer should be written as a string.   |
| qnaMainQuestions | array   | Array of objects. Each question should be written as a string. |
| qnaGroupId       | integer | Group ID that the QnA will be added to                         |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "success": true,
    "message": "Question Added Successfully",
    "addedObject": {
      "id": 3781,
      "type": "suggested",
      "subtype": "user_added",
      "status": "active",
      "language": "en",
      "answerType": "random",
      "actionEnabled": "active",
      "wantFeedback": "active",
      "askedCount": 0,
      "allowRelatedQue": "active",
      "relatedQueIds": "1",
      "createdBy": 1,
      "updatedBy": 1,
      "dateCreated": "2021-03-18T07:13:02.390Z",
      "dateUpdated": "2021-03-18T07:13:02.390Z",
      "qnaMainQuestions": [
        {
          "question": "Test Question 1",
          "id": 5773
        },
        {
          "question": "Test Question 2",
          "qnaMain": {
            "type": "suggested",
            "subtype": "user_added",
            "status": "active",
            "language": "en",
            "answerType": "random",
            "actionEnabled": "active",
            "wantFeedback": "active",
            "askedCount": 0,
            "allowRelatedQue": "active",
            "relatedQueIds": "1",
            "createdBy": 1,
            "updatedBy": 1,
            "dateCreated": "2021-03-18T07:13:02.390Z",
            "dateUpdated": "2021-03-18T07:13:02.390Z",
            "qnaMainQuestions": [
              {
                "question": "Test Question 1",
                "id": 5773
              },
              {
                "question": "Test Question 2",
                "id": 5774
              }
            ],
            "qnaMainAnswers": [
              {
                "answer": "Test Answer 1",
                "answerJson": null,
                "id": 4595
              },
              {
                "answer": "Test Answer 2",
                "answerJson": null,
                "id": 4596
              }
            ],
            "qnaMainActions": [
              {
                "parent": null,
                "triggerType": "auto",
                "buttonVal": "",
                "actionType": "follow_up",
                "actionVal": "Test1",
                "id": 182
              }
            ],
            "id": 3781
          },
          "id": 5774
        }
      ],
      "qnaMainAnswers": [
        {
          "answer": "Test Answer 1",
          "answerJson": null,
          "id": 4595
        },
        {
          "answer": "Test Answer 2",
          "answerJson": null,
          "qnaMain": {
            "type": "suggested",
            "subtype": "user_added",
            "status": "active",
            "language": "en",
            "answerType": "random",
            "actionEnabled": "active",
            "wantFeedback": "active",
            "askedCount": 0,
            "allowRelatedQue": "active",
            "relatedQueIds": "1",
            "createdBy": 1,
            "updatedBy": 1,
            "dateCreated": "2021-03-18T07:13:02.390Z",
            "dateUpdated": "2021-03-18T07:13:02.390Z",
            "qnaMainQuestions": [
              {
                "question": "Test Question 1",
                "id": 5773
              },
              {
                "question": "Test Question 2",
                "id": 5774
              }
            ],
            "qnaMainAnswers": [
              {
                "answer": "Test Answer 1",
                "answerJson": null,
                "id": 4595
              },
              {
                "answer": "Test Answer 2",
                "answerJson": null,
                "id": 4596
              }
            ],
            "qnaMainActions": [
              {
                "parent": null,
                "triggerType": "auto",
                "buttonVal": "",
                "actionType": "follow_up",
                "actionVal": "Test1",
                "id": 182
              }
            ],
            "id": 3781
          },
          "id": 4596
        }
      ],
      "tenantId": "r4b4fl"
    }
  }
}

```

{% endtab %}
{% endtabs %}

## Body(raw)

```
{
  "qnaGroupId": 1,
  "type": "suggested",
  "answerType": "random",
  "status": "active",
  "language": "en",
  "actionEnabled": "active",
  "wantFeedback": "active",
  "allowRelatedQue": "active",
  "relatedQueIds": "1",
  "qnaMainQuestions": [
    {
      "question": "Test Question 1"
    },
    {
      "question": "Test Question 2"
    }
  ],
  "qnaMainAnswers": [
    {
      "answer": "Test Answer 1"
    },
    {
      "answer": "Test Answer 2"
    }
  ],
  "qnaMainActions": [
    {
      "actionType": "follow_up",
      "actionVal": "Test1",
      "qnaMainActions": [],
      "triggerType": "auto"
    }
  ]
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.acquire.io/rest-apis/chatbot/conversational-bot/question-and-answer/add.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
