admin

Admin Force Erase User

Force-erase a user account (admin-only, GDPR Art.17 / APPI compliance).

Skips the 7-day cooling-off period: the deletion executes immediately. Cross-store cleanup (Stripe + Qdrant + Postgres + Redis) is handled by AccountErasureService following the same orchestration as the self-service path.

Required body: reason_code: one of user_request_via_support / legal_order / inactivity_policy / abuse_violation / other reason_detail: free-form admin note (max 1000 chars)

Protections (mirrors SystemAdminService.can_delete_admin): - 403 if target is the initial admin - 403 if target is the last remaining admin - 403 if admin tries to erase their own account - 409 if an erasure request is already in flight for this user - 409 if the target owns a shared workspace and no alternate admin exists for auto-transfer

This endpoint replaces the older DELETE /admin/users/{user_id} for new integrations. The old route is kept temporarily for backward compatibility but does NOT clean Qdrant or all OAuth artifacts.

post/api/v1/admin/users/{user_id}/erase

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/admin/users/{user_id}/erase
  • Auth: none declared

Path parameters

user_idstring required

Request body

reason_code'user_request_via_support' | 'legal_order' | 'inactivity_policy' | 'abuse_violation' | 'other' required
reason_detailstring nullable

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.