> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-013b37f0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete A Conversation

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.

<Tabs>
  <Tab title="Java (User)">
    ```java theme={null}
    CometChat.deleteConversation(UID, CometChatConstants.RECEIVER_TYPE_USER, new CometChat.CallbackListener<String>() {
      @Override
      public void onSuccess(String s) {
        Log.d(TAG, s);
      }

      @Override
      public void onError(CometChatException e) {
        Log.d(TAG, e.getMessage());
      }
    });
    ```
  </Tab>

  <Tab title="Java (Group)">
    ```java theme={null}
    CometChat.deleteConversation(GUID, CometChatConstants.RECEIVER_TYPE_GROUP, new CometChat.CallbackListener<String>() {
      @Override
        public void onSuccess(String s) {
        Log.d(TAG, s);
      }

      @Override
        public void onError(CometChatException e) {
        Log.d(TAG, e.getMessage());
      }
    });
    ```
  </Tab>

  <Tab title="Kotlin (User)">
    ```kotlin theme={null}
    CometChat.deleteConversation(UID, CometChatConstants.RECEIVER_TYPE_USER, object : CallbackListener<String?>() {
      override fun onSuccess(s: String?) {
        Log.d(TAG, s)
      }

      override fun onError(e: CometChatException) {
        Log.d(TAG, e.message)
      }
    })
    ```
  </Tab>

  <Tab title="Kotlin (Group)">
    ```kotlin theme={null}
    CometChat.deleteConversation(GUID, CometChatConstants.RECEIVER_TYPE_GROUP, object : CallbackListener<String?>() {
      override fun onSuccess(s: String?) {
        Log.d(TAG, s)
      }

      override fun onError(e: CometChatException) {
        Log.d(TAG, e.message)
      }
    })
    ```
  </Tab>
</Tabs>

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](https://api-explorer.cometchat.com/reference/deletes-conversation).

The `deleteConversation()` method takes the following parameters:

| Parameter        | Description                                                                       | Required |
| ---------------- | --------------------------------------------------------------------------------- | -------- |
| conversationWith | `UID` of the user or `GUID` of the group whose conversation you want to delete.   | YES      |
| conversationType | The type of conversation you want to delete . It can be either `user` or `group`. | YES      |
