How to Create a Knowledge Base FAQ with API

 

This document provides detailed information on using the ProProfs API to construct a complete FAQ. It includes endpoints for requesting the Table of Contents (TOC), page content, and search functionality within the Knowledge Base.

 

An API key is required to authenticate with the API. This key can be collected from Settings > In-App Help > API key.

 

In this article,

 

1. Requesting TOC for the Knowledge Base

2. Requesting Page Content for the Knowledge Base

3. Requesting Search in the Knowledge Base

 

To Request TOC for the Knowledge Base

 

 

Request Method
POST
 
Request Format
JSON
 
URL Parameters
 

Name

Required

Type

Description

action

Yes

String

Action you want to perform

api_key

Yes

String

Your unique API key for the FAQ

node_id

Yes

Numeric

Return child TOC for for this node id. For top level TOC, use node_id=0.

type

no

string

If looking for whole TOC in one call. Possible value is “all”

 


Example Request


POST https://www.helpdocsonline.com/proprofsapi/v1/
Accept: application/json
Content-Type: application/json
{  
    "action": "gettoc",
    "api_key": "Your API Key",
    "node_id": "0",
    “type”:”all”
  }

We can include one more parameter to get full TOC in one time.
‘type’:’all’ 

 

Response Format
JSON

 

Response Fields

 

Name

Required

node_id

Unique ID of the parent node.

toc_text

Text of the TOC element to display.

slug

Unique URL for the connected page. Here “quick-start-guide-how-to-create-a-quiz” is slug for this FAQ link:

 

https://quiz.proprofs.com/quick-start-guide-how-to-create-a-quiz

page_type

Type of the page. It could be topic or video.

page_status

Whether page is in draft mode or published. 0 = Draft, 1 = Published.

haschildren

Whether child TOC list exist or not. True = Exist, False = Not exist.

order_in_toc Order of the TOC beginning from 1.

 

Response Example


Content-Type: application/json
{
"node_id": "1870496",
"toc_text": "ProProfs Vision",
"slug": "home",
"page_type": "topic",
"page_status": "1",
"haschildren": false,
"order_in_toc": "1"
}


To Import Page Content

 

Endpoint URL
https://www.helpdocsonline.com/proprofsapi/v1/

 

Request Method
POST
 
Request Format
JSON
 
URL Parameters

 

Name

Required

Type

Description

action

Yes

String

Action you want to perform

api_key

Yes

String

Your unique API key for the FAQ

node_id

Yes

Numeric

Return child TOC for for this node id. For top level TOC, use node_id=0.


Example Request


POST https://www.helpdocsonline.com/proprofsapi/v1/

 

Accept: application/json
Content-Type: application/json
{  
    "action": "topic",
    "api_key": "Your API Key",
    "node_id": "0"
  }
 
Response Format
JSON

 

Response Fields

 

Name

Required

topic_title

Page title

topic_content

Page content data (HTML)

 

Response Example


Content-Type: application/json
{
"topic_title": "How can i Upload a file?",
"topic_content": "<html>"
}


To Import Search Functionality

 

POST

 

https://www.helpdocsonline.com/proprofsapi/v1/

 

Accept: application/json
Content-Type: application/json
{  
    "action": "search",
    "api_key": "Your API Key",
    "keyword": "search keyword"
  }
 
Response Format
JSON

 

Response Fields

 

Name

Required

count

Total searches return by system

page_ttile

Page title

page_url

URL of the page


Response Example
Content-Type: application/json
{
    "success": true,
    "count": "1",
    "data": [
        {
            "page_title": "What is inbox",
            "page_url": "https://helpdesk.proprofs.com/configure-inbox"
        }
    ]
}


If you encounter any issues or need further assistance, please contact our support team at support@helpdocsonline.com.

Was this information helpful?
© 2005 - 2024 ProProfs
-
add chat to your website