Files

Upload a file

Upload a new file.

post/v1/files

Request

  • Base URL
    https://api.capacity.com (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header x-capacity-id
    • or HTTP bearer

Request body

file_datastring

base64-encoded string of binary file data to upload. Required if no file object is provided

file_urlstring

URL to file to be uploaded

filenamestring

desired file name for the upload. Must include a file extension. Required if no file object is provided.

folder_idstring

ID of the folder that the file will be created in. Leaving it out indicates the file should be in the root folder of the default knowledge base.

is_publicboolean

Whether the file is public

replace_duplicateboolean

Whether to replace the existing file if there is one with the same name under the same folder

tag_idsstring[]

IDs of global tags to associate with file

tag_namesstring[]

Names of global tags to associate with file

Response

The created file

bodyobject

Json body data in the request

parametersobject

Query parameters in the request

Changes

No recorded changes to this operation across all 1 revision of this API.