Skip to main content
POST
Add Knowledge Base File

Authorizations

Authorization
string
header
required

Specify the authorization token.

For more information, check out the Authorization Guide.

Path Parameters

pearlId
string
required

The unique identifier of the Pearl.

Body

multipart/form-data
File
file

The file to add. Required.

Constraints:

  • Format: .pdf, .docx or .txt, with text that can be read (a scanned PDF without text is refused).
  • File name: up to 200 characters. It is kept and shown in knowledgeBaseFiles of Get Pearl Settings.
  • The knowledge base of the Pearl holds up to 50 files and 25 MB in total, and up to 1,000,000 characters of text for a voice Pearl or 2,000,000 for a text Pearl.

Response

The file was received and is being indexed. Its id is the one to use to download or delete it.

A file of the knowledge base of a Pearl.

id
string | null

The id of the file. Use it to download or delete the file.

name
string | null

The original name of the file, with its extension.

charCount
integer<int64> | null

The number of characters of text read from the file. It counts toward the character limit of the knowledge base (1,000,000 for a voice Pearl, 2,000,000 for a text Pearl). May be null for older files.

byteSize
integer<int64> | null

The size of the file in bytes. It counts toward the 25 MB limit of the knowledge base. May be null for older files.