Skip to main content
Version: v0.31.0

Delete every message in a chat, keeping the chat itself

DELETE 

/api/sessions/:sessionId/chats/:chatId/messages

On success the gateway also removes its stored copies of the chat's messages (rows, inline and archived media, search entries) and emits message:deleted for each. Changes made on the phone are not mirrored.

Request​

Responses​

Returns { success }. false means the engine declined to act — an unknown chat, or on the Baileys engine a chat with no message in memory or stored, since the clear is keyed to its last message.