Skip to main content
POST
/
api
/
AIKnowledge
/
{botId}
curl --request POST \
  --url https://gateway.widebot.net/api/AIKnowledge/{botId} \
  --header 'Content-Type: application/json' \
  --header 'x-bot: <api-key>' \
  --header 'x-user-auth: <api-key>' \
  --data '
{
  "title": "API Documentation",
  "description": "Wikipedia API documentation",
  "KnowledgeSource": 1,
  "SourceContent": [
    "https://en.wikipedia.org/wiki/API"
  ]
}
'
{
  "StatusCode": 200,
  "Response": {},
  "Consumption": "147/10000000"
}

Authorizations

x-user-auth
string
header
required

Your API key from account settings

x-bot
string
header
required

Your bot ID from account settings

Path Parameters

botId
string
required

Bot ID to add knowledge to

Body

application/json
title
string
required

Title for the knowledge entry

Example:

"API Documentation"

KnowledgeSource
enum<integer>
required

Source type for the knowledge

Available options:
0,
1
Example:

1

SourceContent
required

Array of URLs (when KnowledgeSource = 1)

Example:
["https://en.wikipedia.org/wiki/API"]
description
string

Description of the knowledge content

Example:

"API documentation for testing"

Response

200 - application/json

Knowledge entry created successfully

StatusCode
integer

HTTP status code

Example:

200

Response
object

API-specific response data

Consumption
string

Current usage vs quota limit

Example:

"147/10000000"