Skip to main content
The SDK exposes a delete-community API for authorized users when a community is no longer needed. Treat deletion as irreversible from the client UI, and confirm your product’s data-retention and recovery policy outside the client SDK.

Permanent Deletion

Remove communities through the SDK delete API

Permission Control

Rely on backend permission enforcement

Data Cleanup

Clean up local lists, navigation, and UI state

Safety Measures

Implement confirmation flows and recovery-policy messaging

Delete Community

Call the delete-community method with a communityId. TypeScript, Android, and Flutter use deleteCommunity. iOS uses deleteCommunity(withId:). After a successful delete, update any local collection, detail view, or navigation state that still references the community.
Deleting a community cannot be undone through the client SDK. Use explicit confirmation in your product UI before calling the SDK method.

Parameters

ParameterTypeRequiredDescription
communityIdStringYesUnique identifier of the community to delete

Permission Requirements

Deletion is permission-gated by the backend. In most products, deletion controls are shown only to community creators, moderators, or administrators, but the SDK call is still validated server-side.

Client Impact

After successful deletion, handle the client-side effects explicitly:
  • Remove the community from any local list or cached UI state.
  • Navigate away from deleted community detail screens.
  • Stop showing actions that require the deleted communityId.
  • Refresh affected discovery or membership queries when needed.
try await communityRepository.deleteCommunity(withId: "community-id")

Pre-Deletion Considerations

Product Policy

Before exposing deletion, decide how your product handles:
  1. Data retention: What is retained or recoverable outside the client SDK
  2. Member notification: Whether members should be notified before deletion
  3. Alternatives: Whether archive, privacy, or moderation actions are safer than deletion

Member Management

Refresh membership and discovery views after deletion so users do not see stale references to the deleted community.

Best Practices

Safety First: Implement multiple confirmation steps and consider a “cooling off” period for community deletion requests to prevent impulsive decisions.

Implementation Guidelines

  1. Multi-Step Confirmation: Require multiple explicit confirmations
  2. Name Verification: Make users type the community name to confirm
  3. Permission Checks: Verify user permissions before showing delete options
  4. Loading States: Show clear progress during deletion operations
  5. Success Feedback: Provide clear confirmation of successful deletion

User Experience Considerations

  1. Clear Warnings: Emphasize the permanent nature of deletion
  2. Data Export: Offer data export before deletion if your product supports it
  3. Member Communication: Provide tools to notify community members
  4. Navigation: Handle post-deletion navigation appropriately

Update Community

Modify community settings as an alternative to deletion

Community Moderation

Manage communities with moderation tools instead of deletion

Create Community

Learn about community creation to understand deletion impact

Member Management

Handle member relationships before community deletion