Files

interface Files

Files are used to upload documents that can be used across features like Answers, Searches, and Classifications

Inheritors

Functions

Link copied to clipboard
abstract suspend fun delete(fileId: FileId, requestOptions: RequestOptions? = null): Boolean

Delete a file. Only owners of organizations can delete files currently.

Link copied to clipboard
abstract suspend fun download(fileId: FileId, requestOptions: RequestOptions? = null): ByteArray

Returns the contents of the specified fileId.

Link copied to clipboard
abstract suspend fun file(fileId: FileId, requestOptions: RequestOptions? = null): File?

Returns information about a specific file.

abstract suspend fun file(request: FileUpload, requestOptions: RequestOptions? = null): File

Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB.

Link copied to clipboard
abstract suspend fun files(requestOptions: RequestOptions? = null): List<File>

Returns a list of files that belong to the user's organization.