Skip to main content
POST
/
knowledgebase
/
{id}
/
doc
Add content to an existing knowledge base
curl --request POST \
  --url https://api.trugen.ai/v1/knowledgebase/{id}/doc \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form 'text=Sample knowledge base text or URL like https://docs.trugen.ai/' \
  --form input='@example-file'
{
  "added": 1,
  "message": "Content added successfully to existing Knowledge Base"
}

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required

UUID of the Knowledge Base to which the content will be added

Example:

"d837afdc-f95f-4e4d-abe4-40894db22a02"

Body

multipart/form-data
text
string
required

Text or URL content to be added to the Knowledge Base

Example:

"Sample knowledge base text or URL like https://docs.trugen.ai/"

input
file

Optional file upload (e.g., .pdf, .docx)

Response

Content added successfully

added
integer
Example:

1

message
string
Example:

"Content added successfully to existing Knowledge Base"