---
title: "Delete Knowledge File"
method: DELETE
path: "/v1/knowledge-files/{id}"
tags: ["Agent Knowledge Files"]
---

# Delete Knowledge File

`DELETE /v1/knowledge-files/{id}`

## Request

- Base URL: `https://api.bey.dev`
- URL: `https://api.bey.dev/v1/knowledge-files/{id}`
- Auth: API key in header `x-api-key`

Delete a knowledge file.

Fails if any of your agents still references the file; detach it from those
agents first.

## Path parameters

- `id` string, required: Knowledge File ID.

## Response `204`

Successful Response

## Other responses

- `401`: Authentication failed. The `x-api-key` header is missing or the provided API key is invalid.
- `402`: The plan's usage limit has been reached, or the requested feature requires a plan upgrade.
- `403`: The API key is valid but not permitted to perform this action, because the resource belongs to someone else.
- `404`: The requested resource does not exist or is not accessible with this API key.
- `422`: The request is malformed. `detail` lists each field that failed validation, where it was located, and why.
- `429`: The plan's limit on the number of concurrent sessions has been reached.

## Changes

- **2026-10-20** `0469e200c235`: 1 info
  - added the non-success response with the status `402`
- **2026-10-16** `c8f80740b51c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bey-dev/apis/beyond-presence-api/changes/v1/knowledge-files/:id/delete.md)

---

[API](https://skmtc.dev/bey-dev/apis/beyond-presence-api.md) - [All operations](https://skmtc.dev/bey-dev/apis/beyond-presence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bey-dev/apis/beyond-presence-api/revisions/2d37d86bc5c1?raw)
