> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/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] 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).

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 |

> [tab] 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] 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] 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] 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)
>   }
> })
> ```

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

> [card] [Retrieve Conversations](https://www.cometchat.com/docs/sdk/android/v4/retrieve-conversations.md)
>
> Fetch list of conversations

> [card] [Block Users](https://www.cometchat.com/docs/sdk/android/v4/block-users.md)
>
> Block users to prevent messages

> [card] [Leave Group](https://www.cometchat.com/docs/sdk/android/v4/leave-group.md)
>
> Leave group conversations

> [card] [Delete Messages](https://www.cometchat.com/docs/sdk/android/v4/delete-message.md)
>
> Delete individual messages


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.