Skip to main content
Quick Reference
Available via: SDK | REST API | UI Kits
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, and the type (user/group) of conversation to be deleted.
Deleting a conversation is an irreversible operation for the logged-in user. Once deleted, the conversation and its associated data cannot be recovered for that user.
On SuccessdeleteConversation() returns a success message:
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. The deleteConversation() method takes the following parameters:
  • Always confirm with the user before deleting a conversation, as this action is irreversible for the logged-in user.
  • Handle the error callback gracefully to inform users if the deletion fails (e.g., due to network issues or invalid IDs).
  • After a successful deletion, update your local conversation list by refreshing it using ConversationsRequest.
  • Conversation not found: Ensure the UID or GUID you are passing is correct and that a conversation with that user or group exists.
  • Permission denied: Verify that the logged-in user has the appropriate permissions and that the SDK is initialized and the user is logged in.
  • Type mismatch: Make sure the conversationType parameter matches the ID you are passing — use "user" with a UID and "group" with a GUID.

Next Steps

Retrieve Conversations

Fetch and display the list of conversations for the logged-in user.

Delete a Message

Remove individual messages from a conversation.

Receive Messages

Listen for and handle incoming real-time messages.

Messaging Overview

Explore the full set of messaging capabilities available in the SDK.