Saltar al contenido principal
POST
/
v1
/
knowledge
/
base
Create Knowledge Base
import requests

url = "http://localhost:3000/v1/knowledge/base/"

payload = {
    "name": "<string>",
    "description": "<string>",
    "knowledge_item_ids": ["<string>"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "knowledge_items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "extension": "file",
      "status": "indexing",
      "url": "<string>",
      "tags": [],
      "category": "<string>"
    }
  ],
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Name for the new knowledge base

description
string | null

Optional description for the new knowledge base

knowledge_item_ids
string[] | null

Optional list of knowledge item IDs to associate with the base

Response

Successful Response

id
string<uuid>
required

Unique identifier for the knowledge base

name
string
required

Name of the knowledge base

knowledge_items
KnowledgeItemResponse · object[]
required

List of knowledge items associated with this base

description
string | null

Optional description of the knowledge base