---
title: "Remove an input file"
method: DELETE
path: "/agents/{id}/files/{file_id}"
---

# Remove an input file

`DELETE /agents/{id}/files/{file_id}`

## Request

- Base URL: `https://api.endclose.com/v1`
- URL: `https://api.endclose.com/v1/agents/{id}/files/{file_id}`
- Auth: API key in header `X-API-KEY`

Detaches and deletes one of the agent's input files. Runs already in progress keep the copy they downloaded; later runs no longer see the file.

## Path parameters

- `id` string, required
- `file_id` string, required

## Response `204`

File removed

## Other responses

- `401`: Unauthorized
- `403`: Forbidden — agent management requires a standard API key
- `404`: Agent not found, or the file is not one of this agent's input files

## Changes

- **2026-09-09** `e1526383424c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/endclose/apis/end-close-api/changes/agents/:id/files/:file_id/delete.md)

---

[API](https://skmtc.dev/endclose/apis/end-close-api.md) - [All operations](https://skmtc.dev/endclose/apis/end-close-api/llms.txt) - [OpenAPI document](https://skmtc.dev/endclose/apis/end-close-api/revisions/dfe0fde00f12?raw)
