Skip to main content
POST
https://api.getmalakai.com/api/
/
api
/
knowledgebase
Create a Knowledge Base
curl --request POST \
  --url https://api.getmalakai.com/api/api/knowledgebase \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <x-access-token>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "files": [
    "<string>"
  ],
  "urls": [
    "<string>"
  ]
}
'
{
  "responseCode": 2000,
  "message": "Knowledgebase created successfully",
  "data": {
    "name": "test",
    "description": "description",
    "files": [],
    "urls": [
      "https://en.wikipedia.org/wiki/Pakistan"
    ],
    "user_id": "<hidden>",
    "ml_file_id": null,
    "id": "<hidden>",
    "status": "pending",
    "createdAt": "2025-07-29T10:44:05.242Z",
    "updatedAt": "2025-07-29T10:44:05.242Z"
  }
}

Headers

Authorization
string
required
Your API key for authentication. Prefix with Bearer .
x-access-token
string
required
Your access token for authentication.

Body

name
string
required
The name of the knowledgebase to be created.
description
string
required
The description of the knowledgebase to be created.
files
string[]
required
An array of file urls that contain the information to be used in the knowledgebase
urls
string[]
required
Array of web urls that have content to be used in the knowledgebase.

Request Example

{
    "name": "test",
    "description": "description",
    "files": [],
    "urls": [
        "https://en.wikipedia.org/wiki/aboutWiki"
    ]
}

Response

message
string
Status of the request in the form of a short message.
data
object
Object containing the created knowledgebase.
{
  "responseCode": 2000,
  "message": "Knowledgebase created successfully",
  "data": {
    "name": "test",
    "description": "description",
    "files": [],
    "urls": [
      "https://en.wikipedia.org/wiki/Pakistan"
    ],
    "user_id": "<hidden>",
    "ml_file_id": null,
    "id": "<hidden>",
    "status": "pending",
    "createdAt": "2025-07-29T10:44:05.242Z",
    "updatedAt": "2025-07-29T10:44:05.242Z"
  }
}