---
title: "Create a poll"
method: POST
path: "/meetings/{meeting_id}/active-session/poll"
tags: ["Active session"]
---

# Create a poll

`POST /meetings/{meeting_id}/active-session/poll`

## Request

- Base URL: `https://api.dyte.io/v2`
- URL: `https://api.dyte.io/v2/meetings/{meeting_id}/active-session/poll`
- Auth: HTTP basic

Creates a new poll in an active session for the given meeting ID.

## Path parameters

- `meeting_id` string, required

## Request body

- object
  - `question` string: Question of the poll
  - `options` string[]: Different options for the question
  - `anonymous` boolean: if voters on a poll are anonymous
  - `hide_votes` boolean: if votes on an option are visible before a person votes

## Response `201`

response for creating a poll

- object
  - `success` boolean
  - `data` object
    - `action` string
    - `poll` Poll
      - `id` string, required: ID of the poll
      - `question` string, required: Question asked by the poll
      - `options` object[], required: Answer options
        - `text` string, required: Text of the answer option
        - `count` number, required
        - `votes` object[], required
          - `id` string, required
          - `name` string, required
      - `anonymous` boolean
      - `hide_votes` boolean
      - `created_by` string
      - `voted` string[]

## Other responses

- `400`: Bad Request

## Changes

- **2025-04-04** (v2) `cb67ff854c71`: 1 info
  - the endpoint scheme security `Authorization` was added to the API
- **2025-04-03** (v2) `68b9e665bfcc`: 1 info
  - the endpoint scheme security `Authorization` was removed from the API
- **2024-11-20** (v2) `d8c5d90e84ac`: 1 info
  - the endpoint scheme security `Authorization` was added to the API
- **2023-06-19** (v2) `1366dbb30c74`: 1 info
  - added the non-success response with the status `400`

[Operation history](https://skmtc.dev/dyte-io/apis/dyte-rest-apis/changes/meetings/:meeting_id/active-session/poll/post.md)

---

[API](https://skmtc.dev/dyte-io/apis/dyte-rest-apis.md) - [All operations](https://skmtc.dev/dyte-io/apis/dyte-rest-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/dyte-io/apis/dyte-rest-apis/revisions/f62d3edd92ae?raw)
