Skip to content

Delete a file or directory

POST
/v1/sandbox/{sandboxID}/filesystem/delete

Delete a file or directory at the given path. Set recursive to true to delete directories with contents.

sandboxID
required
string

Unique sandbox identifier.

object
path
required

Path to delete.

string
recursive

Recursively delete directory contents.

boolean

File or directory deleted.

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string

Resource not found.

object
message
required

Human-readable error message.

string