Endpoint
Path parameters
The unique identifier (UUID) of the user to delete
Response
Returns HTTP 204 No Content on successful deletion with no response body.Example request
cURL
JavaScript
Python
Error responses
User with the specified ID does not exist
Invalid user ID format (not a valid UUID)
Use cases
- User account deletion (GDPR “right to be forgotten”)
- Administrative cleanup of test accounts
- Account deactivation workflow
- User-initiated account removal
Considerations
Data implications
When a user is deleted:- User record is removed from PostgreSQL database
- Associated preferences are deleted
- Push tokens are removed
Pending notifications
Deleting a user does not affect notifications already queued in RabbitMQ. If a notification for this user is being processed, the worker services will fail to find the user and log an error. The notification will be moved to the failed queue.
Best practices
- Warn users before deletion - Implement a confirmation dialog in your application
- Consider soft delete - Instead of permanent deletion, add a
deleted_attimestamp and filter deleted users from queries - Archive data - Export user data before deletion for compliance or backup purposes
- Cascade cleanup - Ensure related records in other systems are also cleaned up
Alternative: Soft delete pattern
For production systems, consider implementing soft delete instead of hard delete:- Recover accidentally deleted accounts
- Maintain referential integrity
- Comply with data retention policies
- Audit deletion history