Skip to main content
Delete a file or directory. Directories are removed recursively.

Endpoint

DELETE /files/remove

Request

Headers

Authorization: Bearer YOUR_JWT_TOKEN

Query Parameters

ParameterTypeRequiredDescription
pathstringYesPath to delete

Example Request

curl -X DELETE "https://sandbox_abc123xyz.hopx.dev/files/remove?path=/workspace/old_data.txt" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response

Success (200 OK)

{
  "message": "File deleted successfully",
  "path": "/workspace/old_data.txt"
}

Status Codes

CodeDescription
200Deleted
401Unauthorized
404File not found

Use Cases

Cleanup Old Files

curl -X DELETE "https://sandbox_abc123xyz.hopx.dev/files/remove?path=/workspace/temp.txt" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Remove Directory

curl -X DELETE "https://sandbox_abc123xyz.hopx.dev/files/remove?path=/workspace/old_project" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Next Steps