Telegram Bot API

Use this method to send a native poll. On success, the sent Message is returned.

post/sendPoll

Request

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

Request body

business_connection_idstring

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

message_thread_idinteger

Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only

questionstring required

Poll question, 1-300 characters

question_parse_modestring

Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed.

is_anonymousboolean

True, if the poll needs to be anonymous, defaults to True

type'quiz' | 'regular'

Poll type, “quiz” or “regular”, defaults to “regular”

allows_multiple_answersboolean

Pass True, if the poll allows multiple answers, defaults to False

allows_revotingboolean

Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls

shuffle_optionsboolean

Pass True, if the poll options must be shown in random order

allow_adding_optionsboolean

Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes

hide_results_until_closesboolean

Pass True, if poll results must be shown only after the poll closes

members_onlyboolean

Pass True, if voting is limited to users who have been members of the chat where the poll is being sent for more than 24 hours; for channel chats only

country_codesstring[]

A JSON-serialized list of 0-12 two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which users can vote in the poll; for channel chats only. Use “FT” as a country code to allow users with anonymous numbers to vote. If omitted or empty, then users from any country can participate in the poll.

correct_option_idsinteger[]

A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode

explanationstring

Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing

explanation_parse_modestring

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

open_periodinteger

Amount of time in seconds the poll will be active after creation, 5-2628000. Can't be used together with close_date.

close_dateinteger

Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can't be used together with open_period.

is_closedboolean

Pass True if the poll needs to be immediately closed. This can be useful for poll preview.

descriptionstring

Description of the poll to be sent, 0-1024 characters after entities parsing

description_parse_modestring

Mode for parsing entities in the poll description. See formatting options for more details.

disable_notificationboolean

Sends the message silently. Users will receive a notification with no sound.

protect_contentboolean

Protects the contents of the sent message from forwarding and saving

allow_paid_broadcastboolean

Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.

message_effect_idstring

Unique identifier of the message effect to be added to the message; for private chats only

Response

Telegram API response

oktrue required

Changes

    • info

      added the new optional request property /////// (media type: application/json)

    • info

      added the new optional request property /////// (media type: multipart/form-data)

    • info

      added the new optional request property /////// (media type: application/json)

    • info

      added the new optional request property /////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////////// (media type: application/json)

    • info

      added the new optional request property //////////////// (media type: multipart/form-data)

    • info

      added the new optional request property ////////////////// (media type: application/json)

    • info

      added the new optional request property ////////////////// (media type: multipart/form-data)

    • info

      added the new optional request property ////////////////// (media type: application/json)

    • info

      added the new optional request property ////////////////// (media type: multipart/form-data)

    • info

      added the new optional request property ////////////////// (media type: application/json)

    • info

      added the new optional request property ////////////////// (media type: multipart/form-data)

    • info

      added the new optional request property ////////////////// (media type: application/json)

    • info

      added the new optional request property ////////////////// (media type: multipart/form-data)

    • info

      added the new optional request property ///////// (media type: application/json)

    • info

      added the new optional request property ///////// (media type: multipart/form-data)

    • info

      added the new optional request property /////// (media type: application/json)

    • info

      added the new optional request property /////// (media type: multipart/form-data)

    • info

      added the new optional request property //////////// (media type: application/json)

    • info

      added the new optional request property //////////// (media type: multipart/form-data)

    • info

      added to the ////// request property oneOf list (media type: application/json)

    • info

      added to the ////// request property oneOf list (media type: multipart/form-data)

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property //////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property //////////////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property ///////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ///////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property ///////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property //////////////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property //////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property //////////// to the response with the status

    • info

      added the optional property ////////////// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property ///////// to the response with the status