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

# Delete A Conversation

> Delete A Conversation — CometChat documentation.

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="Swift">
    ```swift theme={null}
    CometChat.deleteConversation(conversationWith: "cometchat-uid-1", conversationType: .user, onSuccess: { message in
      print("Conversation deleted",message)
    }, onError: {error in
    	print("delete Convearstion failed with error: \(error?.errorDescription)")
    })
    ```
  </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](/rest-api/chat-apis).

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      |
