curl --request PATCH \
--url https://api.verbex.ai/api/v1/knowledge-bases/{kb_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"document_language": "<string>",
"chunk_size": 2098,
"chunk_overlap": 250,
"assistant_persona": "<string>"
}
'import requests
url = "https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}"
payload = {
"name": "<string>",
"description": "<string>",
"document_language": "<string>",
"chunk_size": 2098,
"chunk_overlap": 250,
"assistant_persona": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
document_language: '<string>',
chunk_size: 2098,
chunk_overlap: 250,
assistant_persona: '<string>'
})
};
fetch('https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}', 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://api.verbex.ai/api/v1/knowledge-bases/{kb_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'document_language' => '<string>',
'chunk_size' => 2098,
'chunk_overlap' => 250,
'assistant_persona' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_language\": \"<string>\",\n \"chunk_size\": 2098,\n \"chunk_overlap\": 250,\n \"assistant_persona\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_language\": \"<string>\",\n \"chunk_size\": 2098,\n \"chunk_overlap\": 250,\n \"assistant_persona\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_language\": \"<string>\",\n \"chunk_size\": 2098,\n \"chunk_overlap\": 250,\n \"assistant_persona\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"document_language": "en",
"document_count": 0,
"chunking_strategy": "recursive",
"vector_backend": "pinecone",
"embedding_model": "text-embedding-3-small",
"chunk_size": 512,
"chunk_overlap": 50,
"assistant_persona": "<string>",
"status": "processing",
"workspace_id": "<string>",
"organization_id": "<string>",
"user_id": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Update Knowledge Base
Updates a knowledge base. Every field is optional; omitting a field leaves it unchanged.
embedding_model and vector_backend cannot be changed after creation and are not accepted here. Changes to chunk_size and chunking_strategy apply at index time, affecting material ingested after the change - nothing already indexed is re-chunked.
curl --request PATCH \
--url https://api.verbex.ai/api/v1/knowledge-bases/{kb_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"document_language": "<string>",
"chunk_size": 2098,
"chunk_overlap": 250,
"assistant_persona": "<string>"
}
'import requests
url = "https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}"
payload = {
"name": "<string>",
"description": "<string>",
"document_language": "<string>",
"chunk_size": 2098,
"chunk_overlap": 250,
"assistant_persona": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
document_language: '<string>',
chunk_size: 2098,
chunk_overlap: 250,
assistant_persona: '<string>'
})
};
fetch('https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}', 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://api.verbex.ai/api/v1/knowledge-bases/{kb_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'document_language' => '<string>',
'chunk_size' => 2098,
'chunk_overlap' => 250,
'assistant_persona' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_language\": \"<string>\",\n \"chunk_size\": 2098,\n \"chunk_overlap\": 250,\n \"assistant_persona\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_language\": \"<string>\",\n \"chunk_size\": 2098,\n \"chunk_overlap\": 250,\n \"assistant_persona\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbex.ai/api/v1/knowledge-bases/{kb_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_language\": \"<string>\",\n \"chunk_size\": 2098,\n \"chunk_overlap\": 250,\n \"assistant_persona\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"document_language": "en",
"document_count": 0,
"chunking_strategy": "recursive",
"vector_backend": "pinecone",
"embedding_model": "text-embedding-3-small",
"chunk_size": 512,
"chunk_overlap": 50,
"assistant_persona": "<string>",
"status": "processing",
"workspace_id": "<string>",
"organization_id": "<string>",
"user_id": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Body
Request body for updating a knowledge base. Every field is optional and nullable; omitting a field leaves it unchanged. embedding_model and vector_backend are absent by design - both are fixed at creation and cannot be changed afterwards.
Response
The updated knowledge base.
Response model for a knowledge base.
Embedding model in use. Note the asymmetry with the create request, which defaults to text-embedding-3-large: this schema's default is text-embedding-3-small because knowledge bases created before the field existed are on small. Read the value off the response rather than assuming it.
text-embedding-3-small, text-embedding-3-large 
