write

Create a poll draft

Save a Telegram poll (or quiz) you wrote as a DRAFT on the channel. Nothing is published until schedule_post is called with the returned post id, exactly as for a text post. Channel polls are always anonymous. Pass correctOption to make it a quiz with one right answer. Question and options are sent as literal plain text: Markdown is not applied (Telegram polls have no bold, links or other formatting). preview_post does not render polls — show the operator the question and options yourself before scheduling. The server spends no AI credits.

post/api/v1/create_poll

Request

  • Base URL: https://awraiter.ai
  • URL: https://awraiter.ai/api/v1/create_poll
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Retry key (≤ 200 characters). A repeated call with the same key returns the first call's result instead of acting twice. Without it the server hashes the arguments, which catches retries but treats a deliberate repeat within 24 hours as one too.

Request body

channelIdnumber required
questionstring required

Poll question, plain text, up to 300 characters.

optionsstring[] required

2 to 10 distinct answer options, plain text, up to 100 characters each, in display order.

allowsMultipleAnswersboolean

Let subscribers pick several options. Default false. Not allowed for a quiz.

correctOptioninteger

Makes the poll a quiz: 0-based index of the one correct option.

Response

The tool's result in data.

okunknown required
dataobject required

Not declared by the tool yet; treat the shape as informational.

Changes

No recorded changes to this operation across all 1 revision of this API.