ナレッジベース

Create knowledge base

Call the file upload endpoint first to obtain the knowledge base file path.

POST/openapi/knowledge/create

リクエスト

パラメータ

Authorizationstring必須

ヘッダー · Authentication token

リクエストボディ

namestring必須

Knowledge base name

filesobject[]必須

File list

[].filePathstring必須

Uploaded file path

[].dataRowNuminteger

Row where the body content starts

[].indexColumnNuminteger[]

List of columns to index

[].separatorstring

Text separators (multiple values allowed, separated by spaces)

[].chunkSizeinteger

Maximum characters per chunk

レスポンス

200 OK
knowledge_codestring必須

Knowledge base code

サンプルコード

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

レスポンス例

{
  "knowledge_code": "string"
}