POST /api/purge
Permanently deletes user or connection data. Supports two modes: purge all data for a user, or purge a single connection.
Deletion is irreversible — vault encryption keys are destroyed, making stored credentials mathematically irrecoverable.
Request
HeadersMode 1: Purge all user data
Deletes all connections and conversations for a user within your app.Mode 2: Purge a single connection
Deletes one specific connection and its conversations.Provide either
userRef or connectionId, not both.What gets deleted
For each affected connection:- Vault key destroyed (
vault_destroy) — encryption key deleted fromconnection_keys - Browserbase context released (if present)
- Connection set to
status: 'revoked',enc_blob: null - Storage files removed from Supabase Storage bucket
- Conversations hard-deleted