> ## Documentation Index
> Fetch the complete documentation index at: https://dev-doc.dualmindlab.tech/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These are the DualMind developer and admin docs. The API base URL is https://api.dualmindlab.tech and the local API runs on http://localhost:5079.
> Never send POST, PUT, PATCH or DELETE requests to the production API while developing; use a local API and a development Supabase project.
> Environment variables are documented by name only. Never ask for or print secret values.
> Admin routes under /api/admin require a Supabase access token for a user whose public.users.role is admin. The PUT routes for users, models, providers and threads write every field, so send the full record; PUT /api/admin/keys/{keyId} writes only the fields you send (sending api_key replaces the key).

# List votes

> Newest first. `search` matches `vote_choice`, or, when it is a UUID, a comparison, user or winning model.

<Badge color="purple" icon="shield-check" stroke>AdminOnly</Badge> <Badge color="surface" icon="key-round">Bearer token, role admin</Badge>


## OpenAPI

````yaml api-reference/openapi-admin.json GET /api/admin/votes
openapi: 3.1.0
info:
  title: DualMind Admin API
  version: 1.0.0
  description: >-
    Admin routes of the DualMind API (`/api/admin/*`). Every route requires a
    Supabase access token for an account whose `public.users.role` is `admin`
    (the `AdminOnly` policy). Responses use the `{ success, data, total, page,
    pageSize, message, error }` envelope.
servers:
  - url: https://api.dualmindlab.tech
    description: Production
  - url: http://localhost:5079
    description: Local (dotnet run)
security:
  - bearerAuth: []
tags:
  - name: Dashboard
  - name: Users
  - name: AI models
  - name: Providers
  - name: API keys
  - name: Comparisons
  - name: Votes
  - name: Threads
  - name: Messages
paths:
  /api/admin/votes:
    get:
      tags:
        - Votes
      summary: List votes
      description: >-
        Newest first. `search` matches `vote_choice`, or, when it is a UUID, a
        comparison, user or winning model.
      operationId: adminListVotes
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
            minimum: 1
          description: Page number, from 1.
        - name: pageSize
          in: query
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 500
          description: >-
            Rows per page (clamped to 1-500). Note the name: `pageSize`, not
            `limit`.
        - name: search
          in: query
          schema:
            type: string
          description: Vote choice, or a UUID.
        - name: userId
          in: query
          schema:
            type: string
            format: uuid
          description: Voter.
        - name: modelId
          in: query
          schema:
            type: string
            format: uuid
          description: Winning model.
        - name: comparisonId
          in: query
          schema:
            type: string
            format: uuid
          description: Comparison.
      responses:
        '200':
          description: A page of votes
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AdminVote'
                  total:
                    type: integer
                    description: Rows matching the filters (not just this page).
                    example: 128
                  page:
                    type: integer
                    example: 1
                  pageSize:
                    type: integer
                    example: 50
                  page_size:
                    type: integer
                    description: Snake-case copy of `pageSize`.
                    example: 50
        '401':
          description: Missing, expired or invalid bearer token.
        '403':
          description: Signed in, but `public.users.role` is not `admin`.
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AdminVote:
      type: object
      properties:
        vote_id:
          type: string
          format: uuid
          description: Vote ID.
        user_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Voter.
        comparison_id:
          type: string
          format: uuid
          description: The comparison voted on.
        winner_model_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Winning model. `null` for `tie` and `both-bad`.
        vote_choice:
          type:
            - string
            - 'null'
          enum:
            - left
            - right
            - tie
            - both-bad
          description: What the voter picked.
          example: left
        vote_duration_ms:
          type:
            - integer
            - 'null'
          description: Time from responses shown to vote, in ms.
          example: 8200
        voted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the vote was cast.
        revealed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When identities were revealed to the voter.
        picked_model_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Alias of `winner_model_id`.
        choice:
          type:
            - string
            - 'null'
          description: Alias of `vote_choice`.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Alias of `voted_at`.
    Error:
      type: object
      properties:
        success:
          type: boolean
          description: Always `false`.
          example: false
        error:
          type: string
          description: What went wrong.
          example: 'Role must be one of: admin, user'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Supabase access token of an account with `role = 'admin'` in
        `public.users`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.