Skip to main content
DELETE
/
api
/
v1
/
files
Delete a file
curl --request DELETE \
  --url https://{sandbox_id_or_name}.sandbox.tensorlake.ai/api/v1/files \
  --header 'Authorization: Bearer <token>'
{
  "error": "<string>",
  "code": "<string>"
}
Delete a file from a sandbox path.

Endpoint

DELETE /api/v1/files?path=<absolute-or-relative-path>

Example Request

curl -X DELETE "https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/files?path=/workspace/temp.txt" \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY"

Response

Tensorlake returns 204 No Content when the file is deleted. If the file does not exist, Tensorlake returns 404 Not Found. Paths containing .. are rejected with 403 Forbidden.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

path
string
required

Absolute or relative file path inside the sandbox.

Response

File deleted successfully