Get Knowledge Base
curl --request GET \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases/{kb_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases/{kb_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases/{kb_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chunk_tokens": 123,
"chunks": 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>"
],
"files": [
{
"filename": "<string>",
"size": 123,
"url": "<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"
}
}Knowledge bases
Get a knowledge base
Read the full details of a brand knowledge base. Discover indexed documents, inspect chunk counts, and verify source truth files used for fact checks.
GET
/
customer
/
v1
/
brands
/
{brand_id}
/
knowledge-bases
/
{kb_id}
Get Knowledge Base
curl --request GET \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases/{kb_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases/{kb_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases/{kb_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chunk_tokens": 123,
"chunks": 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>"
],
"files": [
{
"filename": "<string>",
"size": 123,
"url": "<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"
}
}Authorizations
An API key of your account, from Settings > API Keys. It starts with gnz-.
Response
Successful Response
The chunks of this version.
indexing: the platform reads it now. active: the check of the facts reads it.
Available options:
active, indexing, error, cancelled Available options:
text, url, file Each crawl again makes a new version.
The pages of the last crawl.
The files and the text of the knowledge base.
Show child attributes
Show child attributes
When the platform crawls the site again, in UTC.
Show child attributes
Show child attributes