Knowledge base

Update knowledge base

Add files to a knowledge base. Call the file upload endpoint first to obtain the file path; knowledge_code is returned by the create knowledge base endpoint.

POST/openapi/knowledge/update

Request

Parameters

Authorizationstringrequired

Header

Request body

knowledge_codestringrequired

Knowledge base code

knowledge_namestringrequired

Knowledge base name

filesobject[]required

File list

[].filePathstringrequired

Uploaded file path

[].dataRowNuminteger

Row where the body content starts

[].indexColumnNuminteger[]

List of columns to index

[].separatorstring

Separators (multiple values allowed, separated by spaces)

[].chunkSizeinteger

Maximum characters per chunk

Response

200 OK

No fields

Sample code

curl -X POST 'https://openapi.voicefox.ai/openapi/knowledge/update' \
  -H 'Authorization: Bearer <YOUR_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
  "knowledge_code": "string",
  "knowledge_name": "string",
  "files": [
    {
      "filePath": "string",
      "dataRowNum": 0,
      "indexColumnNum": [
        0
      ],
      "separator": "string",
      "chunkSize": 0
    }
  ]
}'

Response example

{}