Skip to content
Download Beeper

Delete a message

client.messages.delete(stringmessageID, MessageDeleteParams { chatID, forEveryone } params, RequestOptionsoptions?): void
DELETE/v1/chats/{chatID}/messages/{messageID}

Delete a message by final message ID. Pending message IDs are not accepted because messages cannot be deleted while sending.

ParametersExpand Collapse
messageID: string

Message ID.

params: MessageDeleteParams { chatID, forEveryone }
chatID: string

Path param: Chat ID. Input routes also accept the local chat ID from this Beeper Desktop installation when available.

forEveryone?: boolean | null

Query param: True to request deletion for everyone when the network supports it; false to delete only for the authenticated user when supported.

Delete a message

import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});

await client.messages.delete('1343993', { chatID: '!NCdzlIaMjZUmvmvyHU:beeper.com' });
Returns Examples