DELETE /api/admin/users/:id
Permanently delete a user account and all associated data including transactions, categories, accounts, and budgets. This action cannot be undone.Authentication
This endpoint requires:- Valid JWT token in the Authorization header
- User must have ADMIN role
Path Parameters
UUID of the user to delete
Response
Returns a success message.Confirmation message
Example Request
cURL
JavaScript
Example Response
Data Cascade
When a user is deleted, the following data is also permanently removed:User Profile
User Profile
- Email, name, preferences
- Authentication credentials
- Avatar and contact information
Financial Data
Financial Data
- All transactions (income, expenses, transfers)
- All categories (including custom categories)
- All accounts (wallets, savings, investments)
- All budgets and spending targets
Related Records
Related Records
Error Responses
403 - Forbidden
403 - Forbidden
404 - User Not Found
404 - User Not Found
400 - Cannot Delete Admin
400 - Cannot Delete Admin
401 - Unauthorized
401 - Unauthorized
Best Practices
Confirm Before Deletion
Always implement a confirmation dialog in the UI before calling this endpoint
Audit Logging
Log all user deletions with admin ID and timestamp for compliance
Export Data First
Offer users the option to export their data before account deletion
Grace Period
Consider implementing a soft-delete with grace period before permanent deletion
GDPR Compliance
This endpoint can be used to fulfill GDPR “Right to Erasure” (Article 17) requests. When processing data deletion requests:
- Document the request and admin action
- Verify the request is legitimate
- Complete deletion within required timeframe
- Notify the user of completed deletion
Alternative: Deactivation
Instead of permanent deletion, consider deactivating the account:Related Endpoints
List Users
View all users in the system
Reset Password
Reset a user’s password
