curl -X DELETE https://api.phanomcloud.online/bots/3fa85f64-5717-4562-b3fc-2c963f66afa6/files/delete \
-H "Authorization: Bearer sess_..." \
-H "Content-Type: application/json" \
-d '{ "path": "old-script.js" }'
{
"success": true,
"data": { "path": "old-script.js" },
"message": "Deleted successfully."
}
{
"success": false,
"error": "File not found: old-script.js"
}
Files
Delete File
Permanently removes a file or folder from the bot’s directory.
DELETE
/
bots
/
{id}
/
files
/
delete
curl -X DELETE https://api.phanomcloud.online/bots/3fa85f64-5717-4562-b3fc-2c963f66afa6/files/delete \
-H "Authorization: Bearer sess_..." \
-H "Content-Type: application/json" \
-d '{ "path": "old-script.js" }'
{
"success": true,
"data": { "path": "old-script.js" },
"message": "Deleted successfully."
}
{
"success": false,
"error": "File not found: old-script.js"
}
Path Parameters
string
required
UUID of the bot.
Body
string
required
Relative path of the file or folder to delete. Example:
old-script.js or src/legacy/.This action is irreversible. Make a backup before deleting important files.
curl -X DELETE https://api.phanomcloud.online/bots/3fa85f64-5717-4562-b3fc-2c963f66afa6/files/delete \
-H "Authorization: Bearer sess_..." \
-H "Content-Type: application/json" \
-d '{ "path": "old-script.js" }'
{
"success": true,
"data": { "path": "old-script.js" },
"message": "Deleted successfully."
}
{
"success": false,
"error": "File not found: old-script.js"
}

