POST /editMessageText

Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
message_id Integer No

Required if inline_message_id is not specified. Identifier of the message to edit

entities[] Array No

List of special entities that appear in message text, which can be specified instead of parse_mode

entities[].length Integer Yes

Length of the entity in UTF-16 code units

entities[].url String No

Optional. For “text_link” only, url that will be opened after user taps on the text

entities[].user Object No

This object represents a Telegram user or bot.

entities[].user.id Integer Yes

Unique identifier for this user or bot

entities[].user.username String No

Optional. User's or bot's username

entities[].user.can_read_all_group_messages Boolean No

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

entities[].user.last_name String No

Optional. User's or bot's last name

entities[].user.can_join_groups Boolean No

Optional. True, if the bot can be invited to groups. Returned only in getMe.

entities[].user.first_name String Yes

User's or bot's first name

entities[].user.is_bot Boolean Yes

True, if this user is a bot

entities[].user.language_code String No

Optional. IETF language tag of the user's language

entities[].user.supports_inline_queries Boolean No

Optional. True, if the bot supports inline queries. Returned only in getMe.

entities[].type String Yes

Type of the entity. Can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames)

Possible values:

  • "text_mention"
  • "hashtag"
  • "italic"
  • "url"
  • "bot_command"
  • "bold"
  • "cashtag"
  • "mention"
  • "pre"
  • "email"
  • "underline"
  • "code"
  • "phone_number"
  • "strikethrough"
  • "text_link"
entities[].language String No

Optional. For “pre” only, the programming language of the entity text

entities[].offset Integer Yes

Offset in UTF-16 code units to the start of the entity

inline_message_id String No

Required if chat_id and message_id are not specified. Identifier of the inline message

reply_markup Object No

This object represents an inline keyboard that appears right next to the message it belongs to.

reply_markup.inline_keyboard[] Array Yes

Array of button rows, each represented by an Array of InlineKeyboardButton objects

text String Yes

New text of the message, 1-4096 characters after entities parsing

chat_id No

Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)

disable_web_page_preview Boolean No

Disables link previews for links in this message

parse_mode String No

Mode for parsing entities in the message text. See formatting options for more details.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.