diff --git a/sdks/python/README.md b/sdks/python/README.md index 5b3ee5e0d..0649941f8 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -446,6 +446,24 @@ guard for you: await client.messages.delete("bot@agents.e2a.dev", "msg_abc123", permanent=True) ``` +`client.account.delete()` follows the same trash-by-default pattern: every +API key, OAuth grant, and dashboard session is revoked at once, every agent +is trashed, and sending stops immediately, but the account itself stays +restorable by signing in to the dashboard before the receipt's +`purge_after` (API keys stay revoked and custom domains must be +re-verified after a restore; there is no API restore call). Pass +`permanent=True` for the old behavior — irreversible erasure right away +(both the async and sync clients accept the keyword-only argument): + +```python +receipt = await client.account.delete() # mode: "trash", purge_after set +await client.account.delete(permanent=True) # mode: "permanent", erased at once +``` + +`messages_deleted` is always `0` on the trash path; the other counts on +`DeleteUserDataResult` describe rows trashed/revoked/unverified rather than +deleted, and `user_deleted` is `True` only for `mode="permanent"`. + ## WebSocket (real-time delivery for local agents) ```python diff --git a/sdks/typescript/README.md b/sdks/typescript/README.md index 1f1dc1d2e..f227a2afd 100644 --- a/sdks/typescript/README.md +++ b/sdks/typescript/README.md @@ -430,6 +430,23 @@ trashed agents): await client.agents.delete("bot@agents.e2a.dev", { permanent: true }); ``` +`account.delete()` follows the same trash-by-default pattern: every API key, +OAuth grant, and dashboard session is revoked at once, every agent is +trashed, and sending stops immediately, but the account itself stays +restorable by signing in to the dashboard before the receipt's `purgeAfter` +(API keys stay revoked and custom domains must be re-verified after a +restore; there is no API restore call). Pass `{ permanent: true }` for the +old behavior — irreversible erasure right away: + +```ts +const receipt = await client.account.delete(); // mode: "trash", purgeAfter set +await client.account.delete({ permanent: true }); // mode: "permanent", erased at once +``` + +`messagesDeleted` is always `0` on the trash path; the other counts on +`DeleteUserDataResult` describe rows trashed/revoked/unverified rather than +deleted, and `userDeleted` is `true` only for `mode: "permanent"`. + ## Application correlation and email threads `conversationId` is an optional, caller-owned opaque value for correlating mail