Permanent Deletion
Completely remove communities and all associated data
Permission Control
Restrict deletion to authorized creators and moderators
Data Cleanup
Remove posts, comments, members, and metadata automatically
Safety Measures
Implement confirmation flows and backup strategies
Delete Community
The SDK provides a way for creators or moderators to delete a community by calling thedeleteCommunity
method. In the JavaScript SDK, this method is referred to as the closeCommunity
method.
To delete a community using this method, users can call the method and provide the communityId
as a parameter. This will trigger the deletion process, which will remove the community and associated community data.
It is important to note that deleting a community is a permanent action and cannot be undone. As such, it is recommended that users exercise caution when deciding to delete a community and ensure that they have taken all necessary precautions to preserve any important content or data associated with the community.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
communityId | String | Yes | Unique identifier of the community to delete |
Permission Requirements
Role | Delete Permission | Notes |
---|---|---|
Community Creator | Yes | Can delete their own communities |
Community Moderator | Yes | Can delete communities they moderate |
Administrator | Yes | Can delete any community with proper permissions |
Regular Member | No | Cannot delete communities |
Data Removal Impact
When a community is deleted, the following data is removed:- Community Profile: Name, description, avatar, metadata
- All Posts: Text, images, videos, polls, and custom posts
- All Comments: Comments and replies on community posts
- Member List: All community memberships and join requests
- Stories: Community stories and their associated data
- Settings: Post moderation settings and story configurations
Pre-Deletion Considerations
Data Backup Strategies
Before implementing community deletion, consider these backup approaches:- Export Community Data: Allow admins to export posts and member lists
- Migration Options: Migrate content to other communities
- Member Notification: Notify members before deletion with backup options
Member Management
Handle member relationships during deletion:- Active Members: Automatically remove all memberships
- Pending Requests: Cancel all pending join requests
Best Practices
Safety First: Implement multiple confirmation steps and consider a “cooling off” period for community deletion requests to prevent impulsive decisions.
Implementation Guidelines
- Multi-Step Confirmation: Require multiple explicit confirmations
- Name Verification: Make users type the community name to confirm
- Permission Checks: Verify user permissions before showing delete options
- Loading States: Show clear progress during deletion operations
- Success Feedback: Provide clear confirmation of successful deletion
User Experience Considerations
- Clear Warnings: Emphasize the permanent nature of deletion
- Data Export: Offer data export before deletion
- Member Communication: Provide tools to notify community members
- Navigation: Handle post-deletion navigation appropriately