> ## 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.

# Close the live poll



## OpenAPI

````yaml /openapi.yaml post /api/sessions/{id}/polls/{pid}/close
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}/polls/{pid}/close:
    parameters:
      - $ref: '#/components/parameters/SessionId'
      - $ref: '#/components/parameters/PollId'
    post:
      tags:
        - Polls
      summary: Close the live poll
      operationId: closePoll
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostKeyBody'
      responses:
        '200':
          description: Poll is closed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PollState'
        '401':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
      security:
        - bearerAuth: []
        - cookieAuth: []
        - hostKey: []
components:
  parameters:
    SessionId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    PollId:
      name: pid
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    HostKeyBody:
      type: object
      properties:
        k:
          type: string
    PollState:
      type: object
      required:
        - state
        - pollId
      properties:
        state:
          type: string
          enum:
            - open
            - closed
        pollId:
          type: string
          format: uuid
    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.
    hostKey:
      type: apiKey
      in: query
      name: k
      description: Per-room host key. Also accepted as JSON `k`.

````