Delete Knowledge Unit
curl --request DELETE \
--url https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId} \
--header 'x-bot: <api-key>' \
--header 'x-user-auth: <api-key>'import requests
url = "https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}"
headers = {
"x-user-auth": "<api-key>",
"x-bot": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-user-auth': '<api-key>', 'x-bot': '<api-key>'}};
fetch('https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-bot: <api-key>",
"x-user-auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-user-auth", "<api-key>")
req.Header.Add("x-bot", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}")
.header("x-user-auth", "<api-key>")
.header("x-bot", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-user-auth"] = '<api-key>'
request["x-bot"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"StatusCode": 200,
"Response": {},
"Consumption": "147/10000000"
}Delete Knowledge Unit
Permanently delete a knowledge unit and remove its content from the bot’s knowledge base.
Note: Example requests/responses shown here are illustrative. When using the live “Try it” tool, you may see two responses: an HTTP status preview and the API’s JSON body.
DELETE
/
api
/
AIKnowledge
/
{botId}
/
{knowledgeId}
Delete Knowledge Unit
curl --request DELETE \
--url https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId} \
--header 'x-bot: <api-key>' \
--header 'x-user-auth: <api-key>'import requests
url = "https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}"
headers = {
"x-user-auth": "<api-key>",
"x-bot": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-user-auth': '<api-key>', 'x-bot': '<api-key>'}};
fetch('https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-bot: <api-key>",
"x-user-auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-user-auth", "<api-key>")
req.Header.Add("x-bot", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}")
.header("x-user-auth", "<api-key>")
.header("x-bot", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.widebot.net/api/AIKnowledge/{botId}/{knowledgeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-user-auth"] = '<api-key>'
request["x-bot"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"StatusCode": 200,
"Response": {},
"Consumption": "147/10000000"
}Authorizations
Your API key from account settings
Your bot ID from account settings
Path Parameters
Bot ID containing the knowledge unit
Unique identifier of the knowledge unit to delete
Was this page helpful?

