Skip to main content

Getting the file’s metadata

To get the details of a file you can use the Get File API endpoint. You can also use this endpoint to retrieve a new temporary pre-signed URL to download a file if the previous pre-signed URL has already expired.

Listing existing files of a bot

To list all the files of a bot you can use the List Files API endpoint.

Filtering by tag values

If you need to filter files by tags, pass in the tags parameter, which is an object containing tags as key-value pairs. This will only return files that include all the tags (and corresponding values) that you specify.
You can also pass in an array of strings as the tag’s value. This returns files that have that tag with any of the specified values:

Advanced tag filtering

Instead of passing in the value of a tag, you can pass in an object with the exists, not or in properties to allow for more advanced filtering.

exists

Use the exists property to specify whether a tag should be present or absent on the returned files:

not

Use the not property to specify a value (or an array of values) to exclude for a given tag:

in

Use the in property to specify a value (or an array of values) to include for a given tag:

Pagination

The List Files API endpoint will return by default the 20 most recent files your bot has. If you need to list older files you can use the nextToken property returned in the API response to retrieve the next page (if any) of files. The nextToken will be included for each page if there are files remaining to be listed. For example:

Updating the file metadata

Only the tags and access policies of a file can be updated. Here’s an example of how to update the access policies and tags of a file using the Botpress Client:

Updating file content

If you need to update the content of a file, you can create a new file with the updated content and then delete the old file. The file ID will change in this case.

Deleting a file

To delete a file you can use the “Delete File” API endpoint.
Last modified on June 12, 2026