The file object
string
The file’s id.
string
The bot it belongs to.
string
Up to 80 characters, unique per bot.
string
Up to 100,000 characters.
number
Its place in the reading order.
array
Recent versions, each with
id, name, content, reason and createdAt.botFiles/list
POST /rpc/botFiles/list returns a bot’s files in order.
string
required
The bot.
botFiles/create
POST /rpc/botFiles/create adds a file at the end.
string
required
The bot.
string
required
Up to 80 characters.
string
default:"\"\""
Up to 100,000 characters.
botFiles/update
POST /rpc/botFiles/update renames a file, changes its content, or both.
string
required
The file.
string
A new name.
string
The new content.
string
The content you started from. If someone saved first, the call fails with
CONFLICT.botFiles/move
POST /rpc/botFiles/move changes the reading order and returns all the bot’s files.
string
required
The file.
number
required
The new position, from 0.
botFiles/restore
POST /rpc/botFiles/restore brings back an earlier version from the file’s history.
string
required
The file.
string
required
The version’s id.
botFiles/remove
POST /rpc/botFiles/remove deletes a file. Its content stays in the archive, where the bot can still read it with instruction_file_history.
string
required
The file.