# Delete Files

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Delete Files"}
>
</Heading>

<MethodEndpoint
  method={"delete"}
  path={"/api/v1/workspaces/{workspace_name}/files"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Deletes files specified in the `names` parameter from a workspace. If `names` is empty, it deletes all files.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"names":{"description":"The names of the files to delete.","items":{"type":"string"},"maxItems":6000,"title":"File names","type":"array"}},"required":["names"],"title":"FileNames","type":"object"},{"type":"null"}],"description":"Type the names of the files you want to delete, separated with commas.","title":"Files"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
