Skip to main content
DELETE
/
browser
/
sessions
/
{id}
/
fs
/
file
Delete File
curl --request DELETE \
  --url https://api.example.com/browser/sessions/{id}/fs/file

Overview

Removes a single file from the session’s workspace. To delete a directory use DELETE /browser/sessions/{id}/fs/dir with recursive=true. Path must be relative to the workspace root.

Path Parameters

id
string
required
Browser session ID (UUID).

Query Parameters

path
string
required
Workspace-relative file path to delete.

Example Request

curl -X DELETE -G "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/fs/file" \
  -H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
  --data-urlencode "path=notes/todo.txt"

Response

Success Response (204)

No content.

Error Responses

StatusDescription
400Invalid path.
401Unauthorized — invalid or missing API key.
404Session or file not found.
409Target exists but is a directory. Use DELETE /fs/dir instead.