Skip to main content
POST

Overview

Delete a specified user’s conversation record, clearing conversation history and status.

Request Body

Required Parameters

uid
string
required
User ID
channel_id
string
required
Channel ID
channel_type
integer
required
Channel type (1=personal channel, 2=group channel)

Response Fields

status
string
required
Operation status, returns "success" on success

Status Codes

Deletion Impact

What Gets Deleted

When a conversation is deleted, the following data is removed:

What Remains Unchanged

  • Channel Messages: Actual messages in the channel remain intact
  • Other Users: Other users’ conversations with the same channel are unaffected
  • Channel Membership: User remains a member of the channel
  • Message History: User can still access messages by rejoining the conversation

Use Cases

Chat List Management

Remove Conversation from Chat List:
Clean Up Old Conversations:

Privacy and Data Management

User Privacy Control:

Batch Operations

Batch Delete Conversations:

Archive and Restore

Archive Conversation (Soft Delete):

Administrative Operations

Admin Conversation Management:

Important Notes

Data Recovery: Once a conversation is deleted, it cannot be automatically restored. The conversation will only reappear if:
  • New messages are sent to the channel
  • The user manually rejoins the conversation
  • The conversation is recreated through other means
Message Preservation: Deleting a conversation does not delete the actual messages in the channel. Other users can still see all messages, and the user can still access message history through other means.

Best Practices

  1. User Confirmation: Always confirm with users before deleting conversations
  2. Soft Delete Option: Consider implementing archive functionality instead of permanent deletion
  3. Batch Operations: Use batch operations for better performance when deleting multiple conversations
  4. Error Handling: Handle deletion errors gracefully without breaking the UI
  5. Logging: Log conversation deletions for audit and support purposes
  6. UI Updates: Immediately update the UI to reflect conversation removal
  7. Data Backup: Consider backing up conversation metadata before deletion