unpinChatMessage
Remove a pinned message from a chat by providing the chat ID and optional message ID. Use it to unpin the latest pinned message when no ID is specified, with admin rights required for non-private chats.
Instructions
Remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator with can_pin_messages rights in a supergroup or can_edit_messages rights in a channel. Returns True on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Unique identifier for the target chat or username of the target channel (in the format @channelusername) | |
| message_id | No | Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. | |
| business_connection_id | No | Unique identifier of the business connection on behalf of which the message will be unpinned |