> ## 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 using the CometChat iOS SDK.

<Accordion title="AI Integration Quick Reference">
  ```swift theme={null}
  // Delete user conversation
  CometChat.deleteConversation(conversationWith: "UID", conversationType: .user,
    onSuccess: { msg in }, onError: { err in })

  // Delete group conversation
  CometChat.deleteConversation(conversationWith: "GUID", conversationType: .group,
    onSuccess: { msg in }, onError: { err in })
  ```

  **Note:** Deletes only for the logged-in user. Use [REST API](https://api-explorer.cometchat.com/reference/deletes-conversation) to delete for all participants.
</Accordion>

<Warning>
  This operation is irreversible. Deleted conversations cannot be recovered for the logged-in user.
</Warning>

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

<Tabs>
  <Tab title="Delete User Conversation">
    ```swift theme={null}
    CometChat.deleteConversation(conversationWith: "cometchat-uid-1", conversationType: .user, onSuccess: { (message) in
        print("Conversation deleted: \(message)")
    }, onError: { (error) in
        print("Error: \(error?.errorDescription)")
    })
    ```
  </Tab>

  <Tab title="Delete Group Conversation">
    ```swift theme={null}
    CometChat.deleteConversation(conversationWith: "group-guid-1", conversationType: .group, onSuccess: { (message) in
        print("Conversation deleted: \(message)")
    }, onError: { (error) in
        print("Error: \(error?.errorDescription)")
    })
    ```
  </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).

| Parameter        | Type                         | Required | Description                  |
| ---------------- | ---------------------------- | -------- | ---------------------------- |
| conversationWith | `String`                     | Yes      | UID of user or GUID of group |
| conversationType | `CometChat.ConversationType` | Yes      | `.user` or `.group`          |

On success, returns a confirmation message string.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Retrieve Conversations" icon="comments" href="/sdk/ios/retrieve-conversations">
    Fetch and filter conversation lists
  </Card>

  <Card title="Delete Messages" icon="trash" href="/sdk/ios/delete-message">
    Delete individual messages from conversations
  </Card>

  <Card title="Typing Indicators" icon="keyboard" href="/sdk/ios/typing-indicators">
    Show when users are typing in conversations
  </Card>

  <Card title="Delivery & Read Receipts" icon="check-double" href="/sdk/ios/delivery-read-receipts">
    Track message delivery and read status
  </Card>
</CardGroup>
