QnA via API

In this documentation, we will explain how to integrate a QnA via API in your QnA Path.

QnA via API is useful for organizations that wanted to make an QnA Path but need to answer the recipients with dynamic data.

Head to "Setup" and click "QnA Path" and create QnA Path

Input title and choose "QnA via API" as the QnA type

Insert your URL to the field and you can test API call to the url that you provided to see if the reply is correct.

Below is the example POST request payload that our system will send to the url that you have input:

  "caseID": "ABCD1234", // optional
  "channelType": "telegram|whatsapp|whatsappba|facebook|instagram|launcher|etc..."
  "contact": { // optional
    "customerUserID": "",
    "fullName": "John Doe",
    "alias": "",
    "phone": "" //optional

Your API must return response with this payload when called:

  "type": "text|document|image|video",
  "text": { // if type = text
    "body": "Lorem ipsum dolor..."
  "document": { // if type = document
    "url": "https://www.example.com/document.pdf",
    "filename": "Document.pdf",
    "caption": "Please see the attached document..."
  "image": { // if type = image
    "url": "https://www.example.com/image.jpg",
    "caption": "Please see the image..."
  "video": { // if type = video
    "url": "https://www.example.com/video.mp4",
    "caption": "Please watch the video for tutorial..."

if the API call failed, our system will not send the error to your recipients, instead we will send a message that you have input in "Reply message on API error" field. But if you leave this fielf blank, then we will not reply anything to recipients.

Click "Create" on the top right corner to finalize creating a QnA via API.

Last updated