Korely

Core memory operations

Delete a memory

Soft-forget one memory and invalidate the facts it produced. Nothing is hard-deleted, the rows are kept as bi-temporal history and simply drop out of default reads. An audit row is written.

DELETE /v1/memories/{memory_id}

SDK: korely.delete(memory_id). Forgetting a memory sets its deleted_at and invalidates every active fact derived from it (their invalid_at is set). The rows are never physically removed, they stay queryable through as_of so your timeline keeps its history.

Authentication

HTTP header, required: Authorization: Bearer kor_live_.... The key must carry the memories:write scope.

Path parameter

This endpoint takes no query parameters and no request body, only the memory id in the path.

ParameterTypeRequiredDescription
memory_idstringRequiredThe public memory id to forget, e.g. mem_8f2c1a.

Example request

Terminal window
curl -X DELETE https://api.korely.ai/v1/memories/mem_8f2c1a \
-H "Authorization: Bearer kor_live_..."

Response

200 OK. A small receipt confirming the forget, with how many facts were invalidated and the id of the audit row.

{
"id": "mem_8f2c1a",
"status": "forgotten",
"facts_invalidated": 2,
"audit_id": "aud_5d3e9f"
}
FieldTypeDescription
idstringPublic memory id (mem_) that was forgotten.
statusstringAlways forgotten.
facts_invalidatedintegerCount of active facts from this memory that were invalidated (invalid_at set).
audit_idstringPublic id of the audit row recording the forget (scope memory).

Errors

StatusCodeCause
401invalid_keyMissing or invalid kor_live_ key in the Authorization header.
403forbiddenThe key lacks the memories:write scope required to forget a memory.
404not_foundThe memory_id is malformed, or no such memory exists, or it was already deleted.
429rate_limit_exceededRate limit exceeded. Retry after the interval in the Retry-After header.

Notes

  • Soft delete, not erase. The memory's deleted_at is set and its active facts are invalidated (their invalid_at is set). Because Korely is bi-temporal, the rows are kept, they just drop out of default reads and stay reachable via as_of.
  • Write scope required. The key must carry memories:write; a read-only key gets a 403.
  • The request is always logged. The call is recorded for telemetry before the not-found check runs, so even a forget against an unknown id leaves a request log.
  • Idempotent-ish. A second delete of the same memory returns 404, deleted_at is already set, so the memory is filtered out of the lookup.

Related