App Logo
web.whatsapp.com

WhatsApp — Clear chat

Clear all messages from a WhatsApp chat by exact name (the chat stays in your list, just emptied). Optional keepStarred to preserve starred messages. This permanently empties the chat and is only briefly undoable via WhatsApp's own toast.

Input

name required

Exact chat/contact/group name to clear (from get_inbox).

keepStarred optional

Keep starred messages instead of clearing them too. With this set the chat does not end up empty, so the emptiness verification is skipped for that branch.

Default: false

Output

cleared required
recipient required
verified_empty optional

True when the chat was re-read after clearing and held no message rows. Null when keepStarred was set, since the chat legitimately keeps its starred messages.

messages_before optional

Message rows present before clearing, as evidence the chat was non-empty and the clear actually did something.

Start building not clicking