# Messages # Reactions ## Add `client.chats.messages.reactions.add(stringmessageID, ReactionAddParamsparams, RequestOptionsoptions?): ReactionAddResponse` **post** `/v1/chats/{chatID}/messages/{messageID}/reactions` Add a reaction to an existing message. ### Parameters - `messageID: string` - `params: ReactionAddParams` - `chatID: string` Path param: Unique identifier of the chat. - `reactionKey: string` Body param: Reaction key to add (emoji, shortcode, or custom emoji key) - `transactionID?: string` Body param: Optional transaction ID for deduplication and local echo tracking ### Returns - `ReactionAddResponse` - `chatID: string` Unique identifier of the chat. - `messageID: string` Message ID. - `reactionKey: string` Reaction key that was added - `success: true` Whether the reaction was successfully added - `true` - `transactionID: string` Transaction ID used for the reaction event ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop(); const response = await client.chats.messages.reactions.add('messageID', { chatID: '!NCdzlIaMjZUmvmvyHU:beeper.com', reactionKey: 'x', }); console.log(response.chatID); ``` ## Delete `client.chats.messages.reactions.delete(stringmessageID, ReactionDeleteParamsparams, RequestOptionsoptions?): ReactionDeleteResponse` **delete** `/v1/chats/{chatID}/messages/{messageID}/reactions` Remove the authenticated user's reaction from an existing message. ### Parameters - `messageID: string` - `params: ReactionDeleteParams` - `chatID: string` Path param: Unique identifier of the chat. - `reactionKey: string` Query param: Reaction key to remove ### Returns - `ReactionDeleteResponse` - `chatID: string` Unique identifier of the chat. - `messageID: string` Message ID. - `reactionKey: string` Reaction key that was removed - `success: true` Whether the reaction was successfully removed - `true` ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop(); const reaction = await client.chats.messages.reactions.delete('messageID', { chatID: '!NCdzlIaMjZUmvmvyHU:beeper.com', reactionKey: 'x', }); console.log(reaction.chatID); ```