Move a path (E2B envd)
envd's `filesystem.Filesystem/Move` (the SDKs' `files.rename`). Renames `source` to `destination`, replacing a file there.
POST
/compat/e2b/envd/filesystem.Filesystem/Move
envd's `filesystem.Filesystem/Move` (the SDKs' `files.rename`). Renames `source` to `destination`, replacing a file there.
Header Parameters
X-Access-Token
string
required
header
The sandbox's envd access token (`b3os_et_…`), from the create or connect answer.
E2b-Sandbox-Id
string
required
header
The sandbox the call is for (`sandboxID` of the create answer). The token must be this sandbox's.
Request Body required
application/jsonsource
string
destination
string
Responses
200
The entry at its new path.
application/jsonentry
object
name
string
type
string
Enum:
FILE_TYPE_FILE, FILE_TYPE_DIRECTORY, FILE_TYPE_SYMLINKpath
string
size
string
Bytes (an int64 in proto3 JSON).
mode
integer
permissions
string
modifiedTime
string (date-time)
symlinkTarget
string
401
The envd call is refused (`envd_token_invalid`), the same answer on every envd path whatever the reason, in E2B's error shape (Connect clients read the 401 as `unauthenticated`).
curl -X POST 'https://beta-api.b3os.org/compat/e2b/envd/filesystem.Filesystem/Move' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'X-Access-Token: string' \ -H 'E2b-Sandbox-Id: string' \ -H 'Content-Type: application/json' \ -d '{ "source": "/home/user/a.txt", "destination": "/home/user/b.txt"}'
const response = await fetch('https://beta-api.b3os.org/compat/e2b/envd/filesystem.Filesystem/Move', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json", "X-Access-Token": "string", "E2b-Sandbox-Id": "string" }, body: JSON.stringify({ "source": "/home/user/a.txt", "destination": "/home/user/b.txt" })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'X-Access-Token': 'string', 'E2b-Sandbox-Id': 'string'}response = requests.post('https://beta-api.b3os.org/compat/e2b/envd/filesystem.Filesystem/Move', headers=headers, json={ "source": "/home/user/a.txt", "destination": "/home/user/b.txt"})print(response.json())
200
Response
{ "entry": { "name": "b.txt", "type": "FILE_TYPE_FILE", "path": "/home/user/b.txt", "size": "5", "mode": 420, "permissions": "-rw-r--r--", "modifiedTime": "2026-11-02T13:00:00.000Z" }}
API Playground
Try this endpoint
POST
/compat/e2b/envd/filesystem.Filesystem/Move