Create Knowledge Base
curl --request POST \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases"
payload = {
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', title: 'Prices 2026', type: 'text', chunk_tokens: 256})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chunk_tokens": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"status": "active",
"title": "<string>",
"type": "text",
"updated_at": "2023-11-07T05:31:56Z",
"version": 123,
"crawled_pages": 123,
"error": "<string>",
"filenames": [
"<string>"
],
"max_pages": 123,
"notify_emails": [
"<string>"
],
"schedule": {
"interval": "daily",
"days": [
3
],
"time": "03:00"
},
"url": "<string>",
"url_pattern": "<string>"
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}Knowledge bases
Create a knowledge base
Create an AI knowledge base from raw text or a website URL. Read the API reference to index your content.
POST
/
customer
/
v1
/
brands
/
{brand_id}
/
knowledge-bases
Create Knowledge Base
curl --request POST \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases"
payload = {
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', title: 'Prices 2026', type: 'text', chunk_tokens: 256})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chunk_tokens": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"status": "active",
"title": "<string>",
"type": "text",
"updated_at": "2023-11-07T05:31:56Z",
"version": 123,
"crawled_pages": 123,
"error": "<string>",
"filenames": [
"<string>"
],
"max_pages": 123,
"notify_emails": [
"<string>"
],
"schedule": {
"interval": "daily",
"days": [
3
],
"time": "03:00"
},
"url": "<string>",
"url_pattern": "<string>"
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}Authorizations
Headers
Body
application/json
- TextKnowledgeBaseCreate
- UrlKnowledgeBaseCreate
Response
Successful Response