---
title: "Delete Files By Prefix"
method: DELETE
path: "/companies/{company_id}/files"
tags: ["files"]
---

# Delete Files By Prefix

`DELETE /companies/{company_id}/files`

## Request

- Base URL: `https://api.nanocorp.so` (the document declares no server; this is the origin it was published from)
- URL: `https://api.nanocorp.so/companies/{company_id}/files`
- Auth: HTTP bearer

Delete every file under a folder prefix: rows first, then blobs.

``validate_prefix`` normalizes to exactly one trailing "/" so the match can
only take whole segments ("brand/" never matches "brandbook.pdf").

## Path parameters

- `company_id` string, uuid, required

## Query parameters

- `prefix` string, required

## Response `200`

Successful Response

- PrefixDeleteResponse
  - `deleted` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/nanocorp/apis/nanocorp-api.md) - [All operations](https://skmtc.dev/nanocorp/apis/nanocorp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nanocorp/apis/nanocorp-api/revisions/291bb76b720b?raw)
