MemorySync
API Reference

Purge End User

Delete every memory belonging to the calling end user. Named for what it does, so a whole-namespace delete is never the accident of an empty filter.

Endpoint

DELETE/memory/user/purge
200 OK

Takes no body. The scope comes from the API key, the project header, and the end-user header — the same three values every other end-user operation uses.

Purge the current end user

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
end_user_id="usr_7f3a9c2e",
)
result = client.purge_user()

What this removes

Purge boundaries

Removed

Everything owned by this end user in this project and environment.

  • Memories created through the API.
  • Memories extracted from connector objects for this user.
  • Their embeddings and relations.

Not removed

Anything outside the calling scope.

  • Other end users of the same API key.
  • The organization's connector history owned org-wide.
  • Audit records of the deletion itself.

Choose the right delete

How much are you removing?

Specific records

You know the ids.

Use: Use Forget with memory_ids.

Everything matching criteria

By source, tag, tier or date.

Use: Use Forget with filters, previewing with dry_run first.

Everything this user has

A GDPR erasure or account deletion.

Use: Use this operation.

Errors and next action

For 401 or 403, correct credentials or scope. For an interrupted request, call again — purging an already-empty scope is harmless.

Safety notes