Skip to main content
POST
/
bots
/
{id}
/
files
/
rename
curl -X POST https://api.phanomcloud.online/bots/3fa85f64-5717-4562-b3fc-2c963f66afa6/files/rename \
  -H "Authorization: Bearer sess_..." \
  -H "Content-Type: application/json" \
  -d '{
    "dir": "src",
    "old_name": "index.js",
    "new_name": "main.js"
  }'
{
  "success": true,
  "data": {
    "dir": "src",
    "old_name": "index.js",
    "new_name": "main.js"
  },
  "message": "Renamed \"index.js\"\"main.js\""
}

Documentation Index

Fetch the complete documentation index at: https://docs.phanomcloud.online/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

id
string
required
UUID of the bot.

Body

dir
string
Parent directory of the file. Use "" for the bot root. Example: src.
old_name
string
required
Current name of the file or folder. Example: index.js.
new_name
string
required
New name to assign. Example: main.js.
curl -X POST https://api.phanomcloud.online/bots/3fa85f64-5717-4562-b3fc-2c963f66afa6/files/rename \
  -H "Authorization: Bearer sess_..." \
  -H "Content-Type: application/json" \
  -d '{
    "dir": "src",
    "old_name": "index.js",
    "new_name": "main.js"
  }'
{
  "success": true,
  "data": {
    "dir": "src",
    "old_name": "index.js",
    "new_name": "main.js"
  },
  "message": "Renamed \"index.js\"\"main.js\""
}