Telegram Bot API

Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.

post/pinChatMessage

Request

  • Base URL: https://api.telegram.org/bot<bot_token>
  • URL: https://api.telegram.org/bot<bot_token>/pinChatMessage
  • Auth: none declared

Request body

business_connection_idstring

Unique identifier of the business connection on behalf of which the message will be pinned

message_idinteger required

Identifier of a message to pin

disable_notificationboolean

Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.

Response

Telegram API response

oktrue required
resulttrue required

Changes

No recorded changes to this operation across all 3 revisions of this API.