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

# Delete files

> Delete up to 25 files of a knowledge base in one call: all of them, or none.

Deletes several files of one knowledge base, their stored bytes and their passages: all of them, or none. This cannot be undone.

## Path parameters

**id** `string` *required*

UUID of the knowledge base.

## Body

**file\_ids** `string[]` *required*

1 to 25 of its files, each once.

## Request

```bash theme={null}
curl -X POST "https://api.verbeo.ai/v1/knowledge-base/5df09066-0842-4c92-8ef0-6cf2ff6d7455/files/delete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "file_ids": ["c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0", "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d"] }'
```

## Response

`200 OK`: the ids deleted.

```json theme={null}
{
  "success": true,
  "data": { "deleted": ["c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0", "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d"] }
}
```

## Errors

| Code | Status | When |
| - | - | - |
| `VALIDATION_FAILED` | 422 | `file_ids: must name at least one file`, `file_ids: must name at most 25 files`, `file_ids: must name each file once`. |
| `NOT_FOUND` | 404 | No such knowledge base, or an id that is not one of its files: nothing is deleted. |
| `INTERNAL_ERROR` | 500 | `The file could not be deleted. Try again in a moment.` Nothing was deleted. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.