> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a file or directory from the sandbox

> File or directory deleted

### Path parameters

<ParamField path="id" type="string (uuid)" required>
  Sandbox identifier
</ParamField>

### Request body

JSON body of type `DeleteFileRequest`.

### Response

`object`

<ResponseField name="success" type="boolean" required />

<ResponseField name="path" type="string" required>
  Path that was deleted
</ResponseField>

### Status codes

| Code  | Meaning                   |
| ----- | ------------------------- |
| `200` | File or directory deleted |
| `404` | Sandbox not found         |

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/files' \
    --header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "path": "string"
  }
  ```
</ResponseExample>
