> For the complete documentation index, see [llms.txt](https://docs.aicrisk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aicrisk.com/server-admin/api-access/chat/deleting-a-file.md).

# Deleting a File

Deletes a file from an agent or conversation.

<figure><img src="https://2455207419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZwCwAN15BUJcXMA5avi%2Fuploads%2FcK0n2Leqs2EHsKbSqbYy%2Fimage.png?alt=media&amp;token=5bd9330c-968b-4209-b5ac-0e7b20c63498" alt=""><figcaption></figcaption></figure>

**Type:** DELETE

**End Point:** /api/Chat/DeleteFile/{agentid}/{fileId}

**Parameters:**&#x20;

* **agentid-string (path)**
  * *Description: ID of the agent*
* **fileId-string (path)**
  * *Description: ID of the file*
