Korely

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

ParameterTypeDescription
end_userstringThe 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

Terminal window
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"
}
FieldTypeDescription
user_idstringThe end-user namespace that was forgotten (echoes the path param).
memories_forgottenintegerCount of memories soft-deleted (deleted_at set).
facts_invalidatedintegerCount of active facts invalidated (invalid_at set).
audit_idstringPublic id of the audit row, with scope='user'.

Errors

StatusCodeCause
401invalid_keyMissing or invalid kor_live_ key, Invalid or missing API key.
403forbiddenThe key lacks the memories:write scope, API key missing required scope(s): memories:write.
429rate_limit_exceededRate 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_user returns 200 with zero counts, and still writes an audit row.
  • One audit row. Each call writes exactly one audit row with scope='user'.

Related