Skip to main content
The Platform API does not expose a public endpoint to delete a user or reset onboarding. User records are append-only by design — onboarding events, KYC submissions, agent signers, and Safe wallets all reference the user, and a public reset would invalidate those audit trails. For local development and demo work, where you need a clean slate to replay onboarding repeatedly, two internal-only paths are available.
Both paths below are internal admin tooling. They are not exposed over the public API and require direct database credentials. Do not attempt to use them in production or against shared environments.

When you need this

  • Running a demo end-to-end against a local backend.
  • Re-testing onboarding, KYC, or Safe creation flows after an integration change.
  • Clearing accumulated test users from a development organisation.
For staging and production, contact your account manager — there is no self-service reset.

Option 1: Delete a single user

The hard_delete_user.sql script in sumvin/scripts/ removes one user and all their dependent records (wallets, accounts, transactions, agent tasks, insights, rules, statuses, cards, and chat sessions) in dependency order. Edit the @target_user_id value at the top of the script, then run it against your development database:
mysql -h <host> -u <user> -p sumvin < sumvin/scripts/hard_delete_user.sql
The script preserves the user’s organisation, environment, and any shared reference data. Migration state (alembic_version) is also preserved.

Option 2: Reset the entire database

For a full local reset, the hard_delete_all.py script truncates every domain table while preserving the schema and migration history. It prompts twice for confirmation before running.
uv run python -m sumvin.scripts.hard_delete_all
Use this only on a database you own. The script is destructive and cannot be undone.

What the public API does support

  • GET /v0/user/me returns 404 when no user exists for the current JWT — call POST /v0/user/ to create one.
  • POST /v0/user/ is idempotent: replaying it for an existing user returns 208 Already Reported with the existing record, not an error.
If your demo flow only needs to recover from “user already created”, idempotent retries cover the case without any reset.