Trillet AI logo

Upload Knowledge Base File

Upload a knowledge base file to a specific call flow.

POSThttps://api.trillet.ai/v1/api/call-flows/{id}/knowledge-base

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

idstringrequired

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

Request Body

filefilerequired

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

_idstring

The unique identifier for the call flow to which the knowledge base file has been uploaded.

workspaceIdstring

The identifier of the workspace associated with the call flow.

settingsobject

Contains the updated settings for the call flow following the file upload.

knowledgeBaseFilesarray

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:

filenamestring

The name of the file as stored in the system.

keystring

A unique key or identifier used internally to reference the file.

urlstring

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"
        }
      ]
    }
  }