Soft Delete
Mark posts as deleted while preserving data for potential recovery
Hard Delete
Permanently remove posts and all associated data from the database
Permission Control
Only post owners and admins can delete posts
Data Management
Choose the right deletion type for your data policies
Deletion Types Overview
Soft Delete
Soft Delete
How it works: The post is marked as deleted with the
isDeleted flag set to true in the database.Data Preservation:- Post content remains in the database
- Associated reactions and comments are preserved
- Child posts (media attachments) are maintained
- Post becomes invisible to users but can be recovered
- Content moderation with historical data retention
- Data analysis and audit trails
- Compliance with data retention policies
Hard Delete
Hard Delete
How it works: All associated data is permanently removed from the database.Data Removal:
- Post content is completely deleted
- All reactions are permanently removed
- All comments are permanently deleted
- Child posts and media attachments are removed
- Irreversible: Data cannot be recovered after hard deletion
- GDPR compliance and “right to be forgotten”
- Permanent removal of harmful content
- Platform cleanup and storage optimization
- User privacy protection
Implementation
Default Behavior: If no deletion type is specified in older SDK versions (v5 and below), the default behavior is soft deletion.
Access Levels
Post Owner
Post Owner
- Own Posts: Can soft delete or hard delete their own posts
- Content Control: Full control over their published content
- Data Privacy: Can choose the level of data removal
Platform Administrators
Platform Administrators
- Any Post: Can delete any post on the platform
- Moderation Authority: Can remove policy-violating content
- Data Management: Can perform bulk deletion operations
Community Moderators
Community Moderators
- Community Posts: Can delete posts within their moderated communities
- Local Authority: Limited to specific community boundaries
- Escalation Path: Can escalate to admins for platform-level actions
- Guidelines Enforcement: Remove content violating community rules
Platform Availability
SDK Only: Hard deletion is only supported via the SDK and API at this time and is not yet available in the UIKit or Console. Use the PostRepository to specify the post ID and desired deletion type.
Current Support
Current Support
- SDK: Full support for both soft and hard deletion
- API: Direct API access supports both deletion types
- Custom Implementation: Developers can build custom deletion interfaces
Limited Support
Limited Support
- UIKit: Currently limited to soft deletion only
- Console: Admin console has limited deletion options
- Third-party Tools: May not support hard deletion features
Important Considerations
File Handling: Please note that files attached to posts will not be automatically deleted when the post is deleted. You may need to implement separate file cleanup processes if required.
Best Practices
Deletion Strategy
Deletion Strategy
- Default to Soft: Use soft deletion as default for content moderation
- Hard Delete for Privacy: Use hard deletion for privacy and legal compliance
- Clear Policies: Establish clear guidelines for when to use each type
- User Communication: Inform users about deletion policies and options
Implementation Guidelines
Implementation Guidelines
- Permission Validation: Always verify user permissions before deletion
- Confirmation Dialogs: Require explicit confirmation for hard deletions
- Error Handling: Implement robust error handling for deletion failures
Data Management
Data Management
- Regular Cleanup: Implement scheduled cleanup of soft-deleted content
- File Management: Create processes for handling orphaned files
- Backup Strategy: Maintain appropriate backups before hard deletions
- Compliance Monitoring: Track deletion activities for regulatory compliance
Common Use Cases
Content Moderation
Remove inappropriate or policy-violating posts
User Privacy
Allow users to remove their own content
GDPR Compliance
Permanently delete user data upon request
Platform Cleanup
Remove spam or test content