---
title: "Create a poll draft"
method: POST
path: "/api/v1/create_poll"
tags: ["write"]
---

# Create a poll draft

`POST /api/v1/create_poll`

## Request

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

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.

## Headers

- `Idempotency-Key` string

## Request body

- CreatePollInput
  - `channelId` number, required
  - `question` string, required: Poll question, plain text, up to 300 characters.
  - `options` string[], required: 2 to 10 distinct answer options, plain text, up to 100 characters each, in display order.
  - `allowsMultipleAnswers` boolean: Let subscribers pick several options. Default false. Not allowed for a quiz.
  - `correctOption` integer: Makes the poll a quiz: 0-based index of the one correct option.

## Response `200`

The tool's result in `data`.

- CreatePollOutput
  - `ok` unknown, required
  - `data` object, required: Not declared by the tool yet; treat the shape as informational.
  - `usage` Usage: Remaining paid AI actions for the team. Present only on tools that cost AI quota.
    - `aiActionsRemaining` integer, required: -1 when the team is unlimited.
    - `aiActionsLimit` integer, required: -1 when the team is unlimited.
    - `unlimited` boolean, required

## Other responses

- `400`: Invalid arguments (`invalid_input`, with per-field `details`) or a missing `channelId` (`channel_id_required`).
- `401`: No or unknown token (`unauthorized`). The `WWW-Authenticate` header points at the OAuth resource metadata.
- `402`: The team has no active subscription (`subscription_required`).
- `403`: Read-only token on a write tool (`read_only_token`), channel outside the team or the member's ACL (`channel_not_accessible`), channel over the plan limit (`channel_over_plan_limit`), or the user left the team (`not_team_member`).
- `404`: Unknown tool (`unknown_tool`) or an entity the tool could not find (`*_not_found`).
- `409`: The same call is already running (`duplicate_in_flight`); wait instead of retrying.
- `422`: The request was understood but cannot be executed — any other domain error code.
- `428`: The tool needs confirmation before it acts; repeat the call with `confirmationToken`.
- `429`: Rate limit (`rate_limited`, see `Retry-After`), AI quota (`ai_quota_exhausted`) or the daily agent-job budget (`agent_budget_exhausted`).
- `500`: The tool failed unexpectedly (`tool_error`). Nothing internal is disclosed; the `X-Request-Id` header identifies the call for support.

---

[API](https://skmtc.dev/awraiter/apis/awraiter-rest-v1.md) · [All operations](https://skmtc.dev/awraiter/apis/awraiter-rest-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/awraiter/apis/awraiter-rest-v1/revisions/c16dace566cf?raw)
