Skip to main content
// Delete user conversation
await CometChat.deleteConversation("UID", "user");

// Delete group conversation
await CometChat.deleteConversation("GUID", "group");
Note: Deletes only for the logged-in user. Use REST API to delete for all participants.
This operation is irreversible. Deleted conversations cannot be recovered for the logged-in user.
Use deleteConversation() to delete a conversation for the logged-in user.
let UID: string = "UID";
let type: string = "user";
CometChat.deleteConversation(UID, type).then(
  (deletedConversation: string) => {
      console.log(deletedConversation);
  }, (error: CometChat.CometChatException) => {
      console.log('error while deleting a conversation', error);
  }
);    
This deletes the conversation only for the logged-in user. To delete for all participants, use the REST API.
ParameterDescriptionRequired
conversationWithUID or GUID of the conversation to deleteYes
conversationTypeuser or groupYes
On success, returns a confirmation message string.

Next Steps

Retrieve Conversations

Fetch and filter conversation lists

Delete Messages

Delete individual messages from conversations

Typing Indicators

Show when users are typing in conversations

Delivery & Read Receipts

Track message delivery and read status