Create a knowledge base
/knowledge
Requires `knowledge:create`. 409 `knowledge_base_limit_reached` past the per-organization cap of 200, which personal wikis do not count toward. A wiki needs `wiki_scope`; a second personal wiki is 409 `knowledge_personal_wiki_exists` with `details.knowledge_base_id`.
Request Body
docswiki
personalshared
Response Body
The owner, and only the owner, may delete a knowledge base (a personal wiki included).
The person's picture: their stored profile picture, else a Gravatar URL (d=404, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
Fixed at create.
docswiki
Set iff type is wiki.
personalsharednull
curl -X POST 'https://api.elaichi.ai/knowledge' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"your_name","description":"your_description","type":"docs","wiki_scope":"personal"}'const body = {
"name": "your_name",
"description": "your_description",
"type": "docs",
"wiki_scope": "personal"
};
const response = await fetch('https://api.elaichi.ai/knowledge', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/knowledge"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"name": "your_name",
"description": "your_description",
"type": "docs",
"wiki_scope": "personal"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())