Remove memories from recall and search results.

POST /v1/forget

Remove memories from recall and search results. The deletion is auditable and immediately takes effect.

Request

POST /v1/forget
Content-Type: application/json
Authorization: Bearer <api-key>

Body

{
  "query": "old migration notes",
  "reason": "Decision reversed",
  "tenant_id": "my-app"
}

Parameters

| Field | Type | Required | Description | |---|---|---|---| | query | string | No | Pattern or identifier of memories to delete | | reason | string | No | Human-readable justification for the deletion | | tenant_id | string | No | Tenant identifier (default: "default") |

Response

Status: 200 OK

{
  "forgotten_entities": 3,
  "forgotten_edges": 5,
  "audit_id": "aud_abc123"
}

| Field | Type | Description | |---|---|---| | forgotten_entities | integer | Number of entities forgotten | | forgotten_edges | integer | Number of relationship edges forgotten | | audit_id | string | Audit trail identifier |

Example

curl -X POST https://api.cortexdb.io/v1/forget \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "old migration notes",
    "reason": "Decision reversed",
    "tenant_id": "my-app"
  }'

Notes

  • Forgotten memories are immediately excluded from recall and search results.
  • Every forget operation is tracked in the audit trail.