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

# Session projection

> Public audience view by default. `?host=1` or `?mode=wall` need host auth
(`k`, cookie, or Bearer). Host payload includes `k`, roster, and quiz keys
on `polls[]`. Wall is tallies + approved Qs, no roster.




## OpenAPI

````yaml /openapi.yaml get /api/sessions/{id}
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}:
    parameters:
      - $ref: '#/components/parameters/SessionId'
    get:
      tags:
        - Sessions
      summary: Session projection
      description: >
        Public audience view by default. `?host=1` or `?mode=wall` need host
        auth

        (`k`, cookie, or Bearer). Host payload includes `k`, roster, and quiz
        keys

        on `polls[]`. Wall is tallies + approved Qs, no roster.
      operationId: getSession
      parameters:
        - name: host
          in: query
          schema:
            type: string
            enum:
              - '1'
          description: Host projection. Requires host auth.
        - name: mode
          in: query
          schema:
            type: string
            enum:
              - wall
          description: Projector wall. Requires host auth.
        - $ref: '#/components/parameters/HostKeyQuery'
      responses:
        '200':
          description: Projection. Shape depends on audience / host / wall.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Projection'
        '401':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
      security: []
components:
  parameters:
    SessionId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    HostKeyQuery:
      name: k
      in: query
      schema:
        type: string
      description: Per-room host key.
  schemas:
    Projection:
      type: object
      required:
        - status
        - code
        - title
      properties:
        status:
          type: string
          enum:
            - live
            - ended
        code:
          type: string
        title:
          type: string
        brand:
          type: object
          additionalProperties: true
          nullable: true
        poll:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PollBody'
        polls:
          type: array
          items:
            $ref: '#/components/schemas/PollBody'
        questions:
          type: array
          items:
            type: object
            additionalProperties: true
        highlightedQuestionId:
          type: string
          nullable: true
        voted:
          type: boolean
        voteOptionId:
          type: string
          nullable: true
        k:
          type: string
          description: Host only.
        participantCount:
          type: integer
        createdAt:
          type: integer
        endsAt:
          type: integer
        roster:
          type: array
          description: Host only. Do not send to an LLM tool.
          items:
            type: object
            required:
              - email
              - name
              - vote
              - questions
            properties:
              email:
                type: string
              name:
                type: string
              vote:
                type: string
              questions:
                type: string
    PollBody:
      type: object
      required:
        - id
        - kind
        - prompt
        - state
        - options
      properties:
        id:
          type: string
          format: uuid
        kind:
          $ref: '#/components/schemas/PollKind'
        prompt:
          type: string
        state:
          type: string
          enum:
            - draft
            - open
            - closed
        options:
          type: array
          items:
            $ref: '#/components/schemas/PollOption'
        correctOptionId:
          type: string
          format: uuid
          description: Host always; audience only after close.
        words:
          type: array
          items:
            type: object
            required:
              - text
              - 'n'
            properties:
              text:
                type: string
              'n':
                type: integer
        texts:
          type: array
          items:
            type: string
        votes:
          type: integer
          description: Host poll list only.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    PollKind:
      type: string
      enum:
        - multiple_choice
        - word_cloud
        - quiz
        - rating
        - open_text
        - ranking
    PollOption:
      type: object
      required:
        - id
        - label
      properties:
        id:
          type: string
          format: uuid
        label:
          type: string
        tally:
          type: integer
          description: Omitted for audience while the poll is open (except word cloud).
  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.

````