Create a chatbot knowledge base.
curl --request POST \
--url https://api.pineyard.ai/knowledge-bases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.pineyard.ai/knowledge-bases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/knowledge-bases"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "<string>",
"documentCount": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}Knowledge bases
Create a chatbot knowledge base.
POST
/
knowledge-bases
Create a chatbot knowledge base.
curl --request POST \
--url https://api.pineyard.ai/knowledge-bases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.pineyard.ai/knowledge-bases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/knowledge-bases"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "<string>",
"documentCount": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}Required scope:
chatbots.edit
Requires chatbots enabled on your account. Otherwise the request is refused; see Errors.
Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json

