---
title: "DELETE /v2/vals/{val_id}/files"
method: DELETE
path: "/v2/vals/{val_id}/files"
tags: ["vals"]
---

# DELETE /v2/vals/{val_id}/files

`DELETE /v2/vals/{val_id}/files`

Deletes a file or a directory. To delete a directory and all of its children, use the recursive flag. To delete all files, pass in an empty path and the recursive flag.

## Path parameters

- `val_id` string, uuid, required

## Query parameters

- `branch_id` string, uuid
- `path` string, required
- `recursive` boolean, required

## Response `204`

Default Response

## Other responses

- `404` — File not found

---

[API](https://skmtc.net/val-town/apis/val-town-api.md) · [All operations](https://skmtc.net/val-town/apis/val-town-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/val-town/val-town-api/versions/4d8b6d2e6db3/schema)
