Update knowledge base entry
Updates a knowledge base entry with training content. This is the second step in the training process after creating an entry. You can provide "rawText" which is the content you want your replica to learn from (such as product information, company policies, or specialized knowledge). The system will automatically process this text and make it available for your replica to use when answering questions. The entry status will change to PROCESSING and then to READY once fully processed.
Path parameters
-
The unique identifier of the knowledge base entry
-
The replica unique identifier (UUID)
Body
-
The initial text content you want your replica to learn. This is the information you provide that will be processed and optimized for the knowledge base.
Minimum length is
1
. -
Generated facts related to the knowledge base entry.
-
Segments of textual content that have been extracted from the original sources and split into smaller, manageable pieces.
-
Title for this knowledge base entry. Helps identify the content in listings.
-
Auto-generated title for the knowledge base entry based on the content.
-
A concise 1-2 sentence summary of rawText.
-
The language of the knowledge base entry content. Uses ISO 639-1 language codes for language-specific processing and retrieval.
Values are
ab
,aa
,af
,ak
,sq
,am
,ar
,an
,hy
,as
,av
,ae
,ay
,az
,ba
,bm
,eu
,be
,bn
,bh
,bi
,bs
,br
,bg
,my
,ca
,ch
,ce
,ny
,zh
,cu
,cv
,kw
,co
,cr
,hr
,cs
,da
,dv
,nl
,dz
,en
,eo
,et
,ee
,fo
,fj
,fi
,fr
,ff
,gl
,ka
,de
,el
,kl
,gn
,gu
,ht
,ha
,he
,hz
,hi
,ho
,hu
,is
,io
,ig
,id
,ia
,ie
,iu
,ik
,ga
,it
,ja
,jv
,kn
,kr
,ks
,kk
,km
,ki
,rw
,ky
,kv
,kg
,ko
,ku
,kj
,la
,lb
,lg
,li
,ln
,lo
,lt
,lu
,lv
,gv
,mk
,mg
,ms
,ml
,mt
,mi
,mr
,mh
,mn
,na
,nv
,nd
,ne
,ng
,nb
,nn
,no
,ii
,nr
,oc
,oj
,om
,or
,os
,pa
,pi
,fa
,pl
,ps
,pt
,qu
,rm
,rn
,ro
,ru
,sa
,sc
,sd
,se
,sm
,sg
,sr
,gd
,sn
,si
,sk
,sl
,so
,st
,es
,su
,sw
,ss
,sv
,ta
,te
,tg
,th
,ti
,bo
,tk
,tl
,tn
,to
,tr
,ts
,tt
,tw
,ty
,ug
,uk
,ur
,uz
,ve
,vi
,vo
,wa
,cy
,wo
,xh
,yi
,yo
,za
, orzu
. -
Additional properties are NOT allowed.
-
Additional properties are NOT allowed.
-
Additional properties are NOT allowed.
-
Error information related to the knowledge base entry
Additional properties are NOT allowed.
curl \
--request PATCH 'https://api.sensay.io/v1/replicas/03db5651-cb61-4bdf-9ef0-89561f7c9c53/knowledge-base/12345' \
--header "X-ORGANIZATION-SECRET: $API_KEY" \
--header "Content-Type: application/json" \
--header "X-API-Version: 2025-03-25" \
--data '{"rawText":"Our company was founded in 2020. We specialize in AI-powered customer service solutions.","generatedFacts":["The company was founded in 2020.","We specialize in AI-powered customer service solutions."],"rawTextChunks":[{"content":"First part of the document content.","chunkChars":35,"chunkIndex":0,"chunkTokens":7},{"content":"Second part of the document content.","chunkChars":36,"chunkIndex":1,"chunkTokens":7}],"title":"Company information","generatedTitle":"Company information and Business Hours","summary":"Basic company details including founding date, business focus, and operating hours.","language":"en","website":{"url":"https://example.com","links":["string"],"title":"Example Website Title","text":"This is the main text content extracted from the website.","description":"This website provides information about our company and services.","autoRefresh":false,"screenshotURL":"string","screenshot":"string"},"youtube":{"url":"https://www.youtube.com/watch?v=VIDEO_ID","title":"string","description":"string","thumbnailURL":"https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg","summary":"Basic company details including founding date, business focus, and operating hours.","transcription":"This is the complete transcript of the video content...","visualTranscription":"Visual elements and scenes described in text format"},"file":{"name":"company_handbook.pdf","size":204800,"mimeType":"application/epub+zip","screenshot":"string"},"error":{"message":"Failed to process the entry due to invalid format.","fingerprint":"12345"}}'
# Headers
X-API-Version: 2025-03-25
# Payload
{
"rawText": "Our company was founded in 2020. We specialize in AI-powered customer service solutions.",
"generatedFacts": [
"The company was founded in 2020.",
"We specialize in AI-powered customer service solutions."
],
"rawTextChunks": [
{
"content": "First part of the document content.",
"chunkChars": 35,
"chunkIndex": 0,
"chunkTokens": 7
},
{
"content": "Second part of the document content.",
"chunkChars": 36,
"chunkIndex": 1,
"chunkTokens": 7
}
],
"title": "Company information",
"generatedTitle": "Company information and Business Hours",
"summary": "Basic company details including founding date, business focus, and operating hours.",
"language": "en",
"website": {
"url": "https://example.com",
"links": [
"string"
],
"title": "Example Website Title",
"text": "This is the main text content extracted from the website.",
"description": "This website provides information about our company and services.",
"autoRefresh": false,
"screenshotURL": "string",
"screenshot": "string"
},
"youtube": {
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"title": "string",
"description": "string",
"thumbnailURL": "https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg",
"summary": "Basic company details including founding date, business focus, and operating hours.",
"transcription": "This is the complete transcript of the video content...",
"visualTranscription": "Visual elements and scenes described in text format"
},
"file": {
"name": "company_handbook.pdf",
"size": 204800,
"mimeType": "application/epub+zip",
"screenshot": "string"
},
"error": {
"message": "Failed to process the entry due to invalid format.",
"fingerprint": "12345"
}
}
{
"success": true
}
{
"error": "Replica owner knowledge base entry custom quota exceeded. Current usage: 10/10. To fix this, either increase the totalUserQuota value in your request's usageLimits parameter or remove some existing Knowledge Base entries.",
"success": false,
"error_code": "KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
{
"error": "Replica owner knowledge base entry custom quota exceeded. Current usage: 10/10. To fix this, either increase the totalUserQuota value in your request's usageLimits parameter or remove some existing Knowledge Base entries.",
"success": false,
"error_code": "KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
{
"error": "A text representation of the error",
"success": false,
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"error": "Replica owner knowledge base entry custom quota exceeded. Current usage: 10/10. To fix this, either increase the totalUserQuota value in your request's usageLimits parameter or remove some existing Knowledge Base entries.",
"success": false,
"error_code": "KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
{
"error": "A text representation of the error",
"success": false,
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"inner_exception": {
"name": "Server overheated",
"cause": "Request too complicated",
"stack": "Error: Server overheated due to an unexpected situation\n at Object.eval (eval at <anonymous>...",
"message": "The server overheated due to an unexpected situation"
}
}