Overview
Delete a specified channel, including all related data and member relationships.Request Body
Required Parameters
Channel ID
Channel type
1- Personal channel2- Group channel
Response Fields
Operation status, returns
"ok" on successStatus Codes
| Status Code | Description |
|---|---|
| 200 | Channel deleted successfully |
| 400 | Request parameter error |
| 403 | No deletion permission |
| 404 | Channel does not exist |
| 500 | Internal server error |
Deletion Impact
Data Cleanup
Deleting a channel will clean up the following related data:| Data Type | Cleanup Scope | Impact |
|---|---|---|
| Channel Info | Channel basic info, settings | Channel completely disappears |
| Member Relationships | All member subscription relationships | Members can no longer receive messages |
| Message History | All messages in the channel | Message records permanently deleted |
| Conversation Records | Channel in user conversation lists | Channel removed from conversation lists |
User Impact
- Member Notification: All members will receive channel dissolution notification
- Conversation Cleanup: Channel removed from all members’ conversation lists
- Message Loss: Message history in the channel will be unrecoverable
- Permission Invalidation: All channel-related permissions immediately invalidated
Permission Requirements
Personal Channel (channel_type = 1)
- Participants: Any participant in the channel can delete it
- System Administrator: Has permission to delete any personal channel
Group Channel (channel_type = 2)
- Group Owner: Only the group owner can dissolve the group
- System Administrator: Has permission to delete any group
- Regular Members: No deletion permission, can only leave the group
Security Considerations
Deletion Confirmation
Recommend secondary confirmation before deletion:- Permission Verification: Confirm the operator has deletion permission
- Identity Verification: Require password or verification code input
- Impact Warning: Clearly inform the scope of deletion impact
- Final Confirmation: Provide a final chance to cancel
Data Backup
Consider data backup before deletion:- Message Export: Allow export of important messages
- Member List: Save member information for rebuilding
- File Backup: Backup important files in the channel
- Operation Logging: Record detailed information about deletion operations
Alternative Solutions
Soft Delete
For important channels, consider soft deletion:- Hide Channel: Hide from user interface but retain data
- Disable Features: Prohibit sending messages but retain history
- Set Expiration: Set automatic deletion time
- Permission Revocation: Remove all member permissions
Archive Processing
- Message Archive: Transfer messages to archive storage
- Read-only Mode: Set to read-only status
- History Viewing: Allow viewing but no operations
- Periodic Cleanup: Regularly clean up archived data
Best Practices
- Permission Control: Strictly control deletion permissions to prevent misoperations
- Operation Logging: Detailed logging of deletion operations including time, operator, reason
- Notification Mechanism: Timely notification to all related members
- Data Backup: Perform data backup before deleting important channels
- Recovery Mechanism: Provide recovery functionality within a certain time period
- Batch Deletion: Support batch deletion of multiple channels

