> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-agent-in-group-react-v6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Conversation

> Delete one-on-one or group conversations for the logged-in user with the CometChat Android SDK.

<Accordion title="AI Integration Quick Reference">
  ```kotlin theme={null}
  // Delete user conversation
  CometChat.deleteConversation("UID", CometChatConstants.RECEIVER_TYPE_USER,
      object : CallbackListener<String>() {
          override fun onSuccess(message: String) { }
          override fun onError(e: CometChatException) { }
      })

  // Delete group conversation
  CometChat.deleteConversation("GUID", CometChatConstants.RECEIVER_TYPE_GROUP, callback)
  ```

  **Note:** This deletes the conversation only for the logged-in user. To delete for all users, use the [REST API](https://api-explorer.cometchat.com/reference/deletes-conversation).
</Accordion>

Use `deleteConversation()` to delete a conversation for the logged-in user.

| 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      |

<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 deletes the conversation only for the logged-in user. To delete for all participants, use the [REST API](https://api-explorer.cometchat.com/reference/deletes-conversation).

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Retrieve Conversations" icon="list" href="/sdk/android/retrieve-conversations">
    Fetch list of conversations
  </Card>

  <Card title="Block Users" icon="user-slash" href="/sdk/android/block-users">
    Block users to prevent messages
  </Card>

  <Card title="Leave Group" icon="user-minus" href="/sdk/android/leave-group">
    Leave group conversations
  </Card>

  <Card title="Delete Messages" icon="trash" href="/sdk/android/delete-message">
    Delete individual messages
  </Card>
</CardGroup>
