Skip to main content
Quick Reference for AI Agents & Developers
In case you want to delete a conversation, you can use the deleteConversation() method. This method takes two parameters. The unique id (UID/GUID) of the conversation to be deleted & the type (user/group) of conversation to be deleted.

Delete User Conversation

Method: CometChat.deleteConversation(conversationWith:conversationType:)

Delete Group Conversation

Method: CometChat.deleteConversation(conversationWith:conversationType:)
This method deletes the conversation only for the logged-in user. To delete a conversation for all the users of the conversation, please refer to our REST API documentation here.

Method Parameters

The deleteConversation() method takes the following parameters:

Success & Failure Responses

Delete Conversation Success Response

When a conversation is successfully deleted, the onSuccess callback returns a success message:

Delete Conversation Failure Response

When deletion fails, the onError callback returns a CometChatException:

After Deletion


Common Error Codes