Deleting user chats

Deleting user chats

Automated process that can be directly done by the customers

Customer admins can now permanently delete user chats and related uploaded files via a GraphQL endpoint—no more emailing support or waiting for manual cleanup.

To do this you use the chatForceDeleteByChatIdsOrUserId mutation.

Delete specific chats

Prerequisites

  • List of Chat IDs to be deleted

  • CHAT_DATA_ADMIN permission.

Execution

curl --location 'https://gateway.oleole.unique.app/chat/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ***' \ --data '{"query":"mutation ChatForceDeleteByChatIdsOrUserId($chatIds: [String!]!) {\n chatForceDeleteByChatIdsOrUserId(chatIds: $chatIds) {\n deletedChatsCount\n success\n totalChatsCount\n }\n}\n","variables":{"chatIds":["chat_dzuefgl4aiyn90m43ff0s9lv","chat_l4xwgbemob1x5ta2bobx1qi9"]}}'

 

Delete all chats of a user

Prerequisites

  • ID of the user

  • CHAT_DATA_ADMIN permission.

Execution

curl --location 'https://gateway.oleole.unique.app/chat/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ***' \ --data '{"query":"mutation ChatForceDeleteByChatIdsOrUserId($userId: String!) {\n chatForceDeleteByChatIdsOrUserId(userId: $userId) {\n deletedChatsCount\n success\n totalChatsCount\n }\n}\n","variables":{"userId":"313183370379006006"}}'

 


Author

@Michael Dreher

Author

@Michael Dreher