POST
/
v1
/
api
/
call-flows
/
{id}
/
knowledge-base
Upload Knowledge Base File
curl --request POST \
  --url https://api.trillet.ai/v1/api/call-flows/{id}/knowledge-base \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{}'
  {
    "_id": "flowId",
    "workspaceId": "workspaceIdExample",
    "settings": {
      "knowledgeBaseFiles": [
        {
          "filename": "exampleFile.pdf",
          "key": "s3FileKey",
          "url": "https://example.com/file.pdf"
        }
      ]
    }
  }

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Path Parameters

id
string
required
The unique identifier of the call flow to which the knowledge base file will be uploaded.

Request Body

file
file
required
The knowledge base file to upload. Accepted file formats are PDF (.pdf), plain text (.txt), Word document (.docx), and Markdown (.md).
Only one file can be uploaded per request.

Response Fields

_id
string
The unique identifier for the call flow to which the knowledge base file has been uploaded.
workspaceId
string
The identifier of the workspace associated with the call flow.
settings
object
Contains the updated settings for the call flow following the file upload.
knowledgeBaseFiles
array
An array of objects representing the knowledge base files associated with the call flow. Each object in this array provides details about the uploaded files, including:
filename
string
The name of the file as stored in the system.
key
string
A unique key or identifier used internally to reference the file.
url
string
A URL where the uploaded file can be accessed or downloaded.
  {
    "_id": "flowId",
    "workspaceId": "workspaceIdExample",
    "settings": {
      "knowledgeBaseFiles": [
        {
          "filename": "exampleFile.pdf",
          "key": "s3FileKey",
          "url": "https://example.com/file.pdf"
        }
      ]
    }
  }