Users & agents
Forget a user
Soft-forget every memory and fact scoped to one end user in a single call, a GDPR-style customer delete that leaves an audit trail.
DELETE
/v1/users/{end_user}/memories
SDK: korely.delete_all(user_id=end_user). This bulk-forgets the memories
and facts scoped to one end user, for example when a customer asks you to
erase their data. It is a soft delete: rows are kept but
invalidated, drop out of default reads, and one audit row records the
operation.
Authentication
HTTP header, required: Authorization: Bearer kor_live_.... The key must carry the memories:write scope.
Path parameter
| Parameter | Type | Description |
|---|---|---|
end_user | string | The end-user namespace to forget. Every memory and fact scoped to this value is invalidated. An unknown or empty end_user is not an error, it returns 200 with zero counts. |
This endpoint takes no query parameters and no request body.
Example request
curl -X DELETE https://api.korely.ai/v1/users/customer-giulia-4812/memories \ -H "Authorization: Bearer kor_live_..."Response
200 OK. The end-user namespace that was forgotten, the counts of
what was invalidated, and the id of the audit row.
{ "user_id": "customer-giulia-4812", "memories_forgotten": 14, "facts_invalidated": 31, "audit_id": "aud_7b1c20"}| Field | Type | Description |
|---|---|---|
user_id | string | The end-user namespace that was forgotten (echoes the path param). |
memories_forgotten | integer | Count of memories soft-deleted (deleted_at set). |
facts_invalidated | integer | Count of active facts invalidated (invalid_at set). |
audit_id | string | Public id of the audit row, with scope='user'. |
Errors
| Status | Code | Cause |
|---|---|---|
401 | invalid_key | Missing or invalid kor_live_ key, Invalid or missing API key. |
403 | forbidden | The key lacks the memories:write scope, API key missing required scope(s): memories:write. |
429 | rate_limit_exceeded | Rate limit exceeded. The response carries a Retry-After header. |
Notes
- Write scope required. The key must carry
memories:write. - Soft delete, audited. Rows are kept but invalidated and soft-deleted, so they drop out of default reads. This is distinct from
DELETE /v1/agents/{id}, which hard-purges an agent. - No 404. Forgetting an unknown or empty
end_userreturns200with zero counts, and still writes an audit row. - One audit row. Each call writes exactly one audit row with
scope='user'.
Related
- Forget a user, guide, the narrative walkthrough with context.
- List users, see which end users have memories.
- Add a memory, the write path that creates them.