---
title: "Delete an edge (one fact)"
description: "Permanently delete one edge by UUID — both stores.\n\nAn edge carries one fact, so this is the single-fact delete (Zep's\nvocabulary: the deletable object is the edge; the fact is the text\nstored on it). The canonical, explicitly-named replacement for\n``DELETE /memories/{agent_id}/{memory_id}``: same scoping, same\ncascade. The response names the field ``edge_id`` to match the route."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: AI Gateway API › Memory

`DELETE /memories/{agent_id}/edges/{edge_id}`

Permanently delete one edge by UUID — both stores.

An edge carries one fact, so this is the single-fact delete (Zep's
vocabulary: the deletable object is the edge; the fact is the text
stored on it). The canonical, explicitly-named replacement for
``DELETE /memories/{agent_id}/{memory_id}``: same scoping, same
cascade. The response names the field ``edge_id`` to match the route.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `agent_id` (`delete_edge.path.agent_id`; string, required)
- `edge_id` (`delete_edge.path.edge_id`; string, required)

## Query parameters

- `graph_id` (`delete_edge.query.graph_id`; any of, optional) — Optional. Delete from a shared namespace instead of the user's own memory. Requires a service token; the agent_id path segment is ignored.
  - any of: `string`, `null`

## Header parameters

- `X-On-Behalf-Of` (`delete_edge.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`delete_edge.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`
- `X-App-Id` (`delete_edge.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://truememory-api.mvstg.com/memories/<agent_id>/edges/<edge_id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/memories/<agent_id>/edges/<edge_id>';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/memories/<agent_id>/edges/<edge_id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "status": "deleted",
  "edge_id": "string"
}
```

- `edge_id` (`delete_edge.response.200.edge_id`; string, required)
- `status` (`delete_edge.response.200.status`; string, optional)
  - default `"deleted"`

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`delete_edge.response.422.detail`; array<object>, optional)
  - `loc` (`delete_edge.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`delete_edge.response.422.detail.msg`; string, required)
  - `type` (`delete_edge.response.422.detail.type`; string, required)
  - `input` (`delete_edge.response.422.detail.input`; unknown, optional)
  - `ctx` (`delete_edge.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/memories/edges/delete/index.md
