> ## 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.

# Purge Expired

> Permanently delete memories expired longer than the purge window.

## Overview

Permanently deletes memories that have been expired for longer than the policy's `purge_expired_after`. With `dry_run: true` it reports what would be deleted.

## 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.

## Body

**dry\_run** `boolean` (default: false)

Report only.

```bash cURL theme={null}
curl -X POST "https://api.memanto.ai/agents/my-agent/policy/purge" \
  -H "x-api-key: $MEMANTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dry_run": true
  }'
```

```json 200 - OK theme={null}
{
  "agent_id": "my-agent",
  "dry_run": true,
  "enabled": true,
  "matched": 3,
  "purged": 0,
  "memories": [],
  "errors": [],
  "evaluated_at": "2026-11-19T15:04:05.000Z"
}
```


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