The deletion period
Each instance has a deletion period, 0 to 30 days, 30 by default. Set it when you create the instance, or change it in the dashboard or with the CLI (maximem-synap instances update <id> --deletion-period-days 7, which needs update:instances). A runtime key cannot change it, and every change is audited. The period in force when a memory is deleted is fixed on that memory, so a later change never shortens a restore window that is already running. Forget requests by a user get the same period and have no permanent option.
What it does
You ask Synap to delete the data it holds about one thing, and you name that thing:- One user: their memories, conversations with their turns and summaries, profile, and the search and graph entries built from them.
- One conversation: that conversation’s turns and summaries only. Memories learned from it are kept.
- One customer (B2B): the customer’s stored data, including every user under it.
scope as a parameter. It needs Python SDK maximem-synap 0.6.9 or newer, or JS SDK @maximem/synap-js-sdk 0.6.5 or newer.
The three scopes and the key each needs
- A B2C instance has no customer scope:
scope="customer"is refused there. Usescope="user". - On B2B,
customer_idis required for all three scopes. On B2C it is not accepted. - Deleting a whole client is not supported through this call.
- Onboarding keys and read-only keys cannot delete.
The
scope here is a plain string. It is not the rung-path dict that memories.create and the fetch methods take as scope; a dict is rejected.Preview first, then delete
A delete takes two steps so that what you remove is what you meant to remove.1
Preview with dry_run
dry_run=True counts what would be removed and changes nothing. It needs no confirm.2
Delete with confirm
For a real delete,
confirm is required and must equal the id being deleted: user_id for "user", conversation_id for "conversation", customer_id for "customer". A mismatch is rejected before anything is changed.confirm guards against typos. It does not replace key security: anyone holding a runtime key can delete any user or conversation in that key’s instance, so keep keys secret and rotate a leaked one at once.
Python
TypeScript
scope, userId, customerId, conversationId, dryRun, confirm and wait. Result fields keep the server’s names (fully_removed, still_present_in, deletion_id).
Large deletes: wait
A large delete is done in capped steps. With wait=True (the default) the SDK repeats the call while the server says continue, up to 50 calls. With wait=False it returns after one call and you call again with the same arguments. Repeating the same request is safe.
Statuses
Partial is a result, not an error. No exception is raised. Read
fully_removed and still_present_in, and do not tell an end user their data is gone unless fully_removed is true. A partial result lists what remains, and you can run the same delete again.
Why a store is skipped
A store that cannot be cleared safely is skipped, named instill_present_in, and stores gives the reason:
If something was written for the target while the delete ran, the response says
may_have_new_data and the status is partial. Stop writing for that person first, delete, then delete again.
Audit record
Every real delete leaves a record with its status, counts andstill_present_in. It holds no content and no raw user, customer or conversation ids. Read it with data.status:
data.status is instance-bound: it returns records of your key’s instance only. Dry runs write no record.
What is not deleted
Kept on every scope:- Memory-fetch records (the hit rate of anticipation) for up to 30 days. A delete for a user whose records still exist reports
partialwithfetch outcomes. - Working tables of entity resolution and review (names and context text kept for matching, consolidation runs, held mentions and the quarantine for sensitive values). This call does not remove them yet. Contact support if you need them removed.
- Billing and usage counters (ids and amounts, no content).
- The content-free audit record of the delete itself.
- The identity mapping from your external id to Synap’s internal id, with names, descriptions and context on it blanked.
- Request logs that carry no user or customer id. They expire on their own.
- Client-wide knowledge, and other customers’ data.
- Source text that another memory still rests on.
- Backups taken before the delete, until they expire.
- Anything still queued for extraction when you call delete can land afterwards. Stop writing first, delete, then delete again.
local_cleared). Files your own app keeps are yours to remove.
It is instance-bound
A key can only delete inside its own instance and client. A runtime key cannot reach another instance, another client or (without a management key) a whole customer. If the same user lives in two of your instances, delete from each. Limits per key: 10 delete calls per minute and 100 per hour, plus 60 dry runs per minute. Over a limit you get 429; wait and repeat the same call. A delete works even when your credit balance is empty.How it differs from memories.delete
memories.delete follows the same rule: hidden at once, restorable until purge_after, then purged; permanent=True removes it now. To remove what was learned from one conversation, delete the user or the individual memories, because scope="conversation" keeps them.
Errors
InvalidInputError: bad arguments, caught before any request, or HTTP 400 (for examplescope="customer"on B2C).AuthenticationError: HTTP 401, or 403 when the key is not allowed to delete, or belongs to another instance.ConflictError: HTTP 409, when the id belongs to a different customer, or the same delete is already running.RateLimitError: HTTP 429.