Skip to content
  • Auto
  • Light
  • Dark
Get Started

Delete

Delete
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_idstring
formatuuid
Query Parameters
pathstring

Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an empty string to represent the root directory.

recursiveboolean

Whether to recursively act on all files in the project

branch_idstring
optional

The specified branch of the resource. Defaults to main if not provided.

formatuuid
curl https://api.val.town/v2/vals/$VAL_ID/files \
    -X DELETE \
    -d '{}'