POST /sendPoll
Use this method to send a native poll. On success, the sent Message is returned.
Servers
- https://api.telegram.org/bot{token}
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 |
---|---|---|---|
is_anonymous |
Boolean | No |
True, if the poll needs to be anonymous, defaults to True |
allows_multiple_answers |
Boolean | No |
True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False |
allow_sending_without_reply |
Boolean | No |
Pass True, if the message should be sent even if the specified replied-to message is not found |
is_closed |
Boolean | No |
Pass True, if the poll needs to be immediately closed. This can be useful for poll preview. |
correct_option_id |
Integer | No |
0-based identifier of the correct answer option, required for polls in quiz mode |
explanation_entities[] |
Array | No |
List of special entities that appear in the poll explanation, which can be specified instead of parse_mode |
explanation_entities[].length |
Integer | Yes |
Length of the entity in UTF-16 code units |
explanation_entities[].url |
String | No |
Optional. For “text_link” only, url that will be opened after user taps on the text |
explanation_entities[].user |
Object | No |
This object represents a Telegram user or bot. |
explanation_entities[].user.id |
Integer | Yes |
Unique identifier for this user or bot |
explanation_entities[].user.username |
String | No |
Optional. User's or bot's username |
explanation_entities[].user.can_read_all_group_messages |
Boolean | No |
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe. |
explanation_entities[].user.last_name |
String | No |
Optional. User's or bot's last name |
explanation_entities[].user.can_join_groups |
Boolean | No |
Optional. True, if the bot can be invited to groups. Returned only in getMe. |
explanation_entities[].user.first_name |
String | Yes |
User's or bot's first name |
explanation_entities[].user.is_bot |
Boolean | Yes |
True, if this user is a bot |
explanation_entities[].user.language_code |
String | No |
Optional. IETF language tag of the user's language |
explanation_entities[].user.supports_inline_queries |
Boolean | No |
Optional. True, if the bot supports inline queries. Returned only in getMe. |
explanation_entities[].type |
String | Yes |
Type of the entity. Can be “mention” ( Possible values:
|
explanation_entities[].language |
String | No |
Optional. For “pre” only, the programming language of the entity text |
explanation_entities[].offset |
Integer | Yes |
Offset in UTF-16 code units to the start of the entity |
reply_markup |
No |
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
|
explanation_parse_mode |
String | No |
Mode for parsing entities in the explanation. See formatting options for more details. |
open_period |
Integer | No |
Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. |
options[] |
Array | Yes |
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each |
disable_notification |
Boolean | No |
Sends the message silently. Users will receive a notification with no sound. |
chat_id |
Yes |
Unique identifier for the target chat or username of the target channel (in the format |
|
question |
String | Yes |
Poll question, 1-300 characters |
type |
String | No |
Poll type, “quiz” or “regular”, defaults to “regular” |
explanation |
String | No |
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 |
close_date |
Integer | No |
Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period. |
reply_to_message_id |
Integer | No |
If the message is a reply, ID of the original message |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.