Move Path
curl --request PUT \
--url https://api.example.com/browser/sessions/{id}/fs/move \
--header 'Content-Type: application/json' \
--data '
{
"from": "<string>",
"to": "<string>"
}
'import requests
url = "https://api.example.com/browser/sessions/{id}/fs/move"
payload = {
"from": "<string>",
"to": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({from: '<string>', to: '<string>'})
};
fetch('https://api.example.com/browser/sessions/{id}/fs/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/browser/sessions/{id}/fs/move",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'from' => '<string>',
'to' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/browser/sessions/{id}/fs/move"
payload := strings.NewReader("{\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/browser/sessions/{id}/fs/move")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/sessions/{id}/fs/move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"from": "<string>",
"to": "<string>"
}Filesystem
Move Path
Rename or move a workspace path.
PUT
/
browser
/
sessions
/
{id}
/
fs
/
move
Move Path
curl --request PUT \
--url https://api.example.com/browser/sessions/{id}/fs/move \
--header 'Content-Type: application/json' \
--data '
{
"from": "<string>",
"to": "<string>"
}
'import requests
url = "https://api.example.com/browser/sessions/{id}/fs/move"
payload = {
"from": "<string>",
"to": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({from: '<string>', to: '<string>'})
};
fetch('https://api.example.com/browser/sessions/{id}/fs/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/browser/sessions/{id}/fs/move",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'from' => '<string>',
'to' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/browser/sessions/{id}/fs/move"
payload := strings.NewReader("{\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/browser/sessions/{id}/fs/move")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/sessions/{id}/fs/move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"from": "<string>",
"to": "<string>"
}Overview
Renames or moves a file or directory within the session’s workspace. Bothfrom and to must be workspace-relative (no leading /, no ..). Cross-filesystem moves are not supported — both paths live inside the same workspace.
Path Parameters
string
required
Browser session ID (UUID).
Body
string
required
Source workspace-relative path.
string
required
Destination workspace-relative path.
Example Request
curl -X PUT "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/fs/move" \
-H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "downloads/invoice.pdf",
"to": "archive/2026/invoice.pdf"
}'
Response
Success Response (200)
string
Original workspace-relative path.
string
New workspace-relative path.
{
"from": "downloads/invoice.pdf",
"to": "archive/2026/invoice.pdf"
}
Error Responses
| Status | Description |
|---|---|
400 | Invalid from or to. |
401 | Unauthorized — invalid or missing API key. |
404 | Session or source path not found. |
409 | Destination already exists or crosses a non-directory. |
Was this page helpful?
⌘I