Skip to main content
POST

Overview

Delete a specified channel, including all related data and member relationships.

Request Body

Required Parameters

string
required
Channel ID
integer
required
Channel type
  • 1 - Personal channel
  • 2 - Group channel

Response Fields

string
required
Operation status, returns "ok" on success

Status Codes

Deletion Impact

Data Cleanup

Deleting a channel will clean up the following related data:

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:
  1. Permission Verification: Confirm the operator has deletion permission
  2. Identity Verification: Require password or verification code input
  3. Impact Warning: Clearly inform the scope of deletion impact
  4. 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

  1. Permission Control: Strictly control deletion permissions to prevent misoperations
  2. Operation Logging: Detailed logging of deletion operations including time, operator, reason
  3. Notification Mechanism: Timely notification to all related members
  4. Data Backup: Perform data backup before deleting important channels
  5. Recovery Mechanism: Provide recovery functionality within a certain time period
  6. Batch Deletion: Support batch deletion of multiple channels