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

# Delete File

> Delete a file and the memories made from it.

## Overview

Deletes the file and the memories made from it. Deletion runs in the background as its own job: poll [Get File Job](https://docs.memanto.ai/cloud/api/files/get-file-job.md) with the returned `job_id`.

## Authentication

**x-api-key** `string` *required*

Your Memanto Cloud API key (`mk_...`). See [Authentication](https://docs.memanto.ai/cloud/api/introduction.md#authentication).

## Path Parameters

**agent\_id** `string` *required*

The agent's ID.

**file\_id** `string` *required*

The file's ID, from [Upload File](https://docs.memanto.ai/cloud/api/files/upload-file.md) or [List Files](https://docs.memanto.ai/cloud/api/files/list-files.md).

```bash cURL theme={null}
curl -X DELETE "https://api.memanto.ai/agents/my-agent/files/file_…" \
  -H "x-api-key: $MEMANTO_API_KEY"
```

```json 200 - OK theme={null}
{
  "agent_id": "my-agent",
  "file_id": "file_…",
  "job_id": "job_…",
  "status": "deleting",
  "storage_key": "…",
  "hint": "Poll GET .../file-jobs/job_…. agent_files row is removed when memory cleanup finishes."
}
```


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