> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askplane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vote on the open poll

> Cookie `ws_part` required. `optionId` for choice/quiz/rating; `text` for
word cloud / open text; `ranks` for ranking. Allowed while session live
and a poll is open.




## OpenAPI

````yaml /openapi.yaml post /api/sessions/{id}/vote
openapi: 3.1.0
info:
  title: Askplane Session API
  version: 0.0.1
  summary: Same /api/sessions/* routes the web app and PowerPoint add-in already call.
  description: >
    Contract for web, the PowerPoint pane, and a later MCP wrapper. **Not a
    second API.**

    Same `/api/sessions/*` routes: no versioned second surface.


    Host auth (any one): cookie `ws_host`, `Authorization: Bearer` (same HMAC as
    the cookie),

    or per-room host key `k` (`?k=` or JSON `k`). Mint a Bearer with `POST
    /api/me/token`

    (cookie only). Logout does not revoke it.


    Audience: join once, then cookie `ws_part`. Room cap is **200**
    (`ROOM_CAP`).

    Create leaves a poll in `draft` until open.


    Mintlify reads this file from `mintlify/docs.json` (`api.openapi` + Session
    API tab).
  contact:
    name: Askplane
    url: https://www.askplane.com
servers:
  - url: https://www.askplane.com
    description: Production
  - url: http://localhost:3000
    description: Local
security:
  - bearerAuth: []
  - cookieAuth: []
tags:
  - name: Sessions
    description: Create, list, update, end, export.
  - name: Polls
    description: Draft, open, close. One live poll at a time.
  - name: Audience
    description: Join, vote, ask.
  - name: Questions
    description: Host moderate (approve, highlight, hide, unpin).
  - name: Auth
    description: Cookie-only Bearer mint.
paths:
  /api/sessions/{id}/vote:
    parameters:
      - $ref: '#/components/parameters/SessionId'
    post:
      tags:
        - Audience
      summary: Vote on the open poll
      description: |
        Cookie `ws_part` required. `optionId` for choice/quiz/rating; `text` for
        word cloud / open text; `ranks` for ranking. Allowed while session live
        and a poll is open.
      operationId: vote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoteBody'
      responses:
        '200':
          description: Vote stored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voted'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      security:
        - audienceCookie: []
components:
  parameters:
    SessionId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    VoteBody:
      type: object
      properties:
        optionId:
          type: string
          format: uuid
        text:
          type: string
        ranks:
          type: array
          items:
            type: string
            format: uuid
    Voted:
      type: object
      required:
        - voted
      properties:
        voted:
          type: boolean
          enum:
            - true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    Error:
      description: '{ error } plus HTTP status. asJson strips ok.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Same HMAC as cookie `ws_host`. Mint via `POST /api/me/token`.
    cookieAuth:
      type: apiKey
      in: cookie
      name: ws_host
      description: Browser host cookie after login.
    audienceCookie:
      type: apiKey
      in: cookie
      name: ws_part
      description: Set by join. Value {sessionId}:{participantId}.

````