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

# List sessions

> Returns sessions the authenticated user has access to (owns or participates in).
Results are ordered by most recently updated first.




## OpenAPI

````yaml /api-reference/openapi.yaml get /sessions
openapi: 3.1.0
info:
  title: Harmonica API
  version: 1.0.0
  description: >
    REST API for the Harmonica structured deliberation platform.

    Provides access to sessions and their data, including creating, updating,
    and querying sessions, plus response submission for active sessions.
  contact:
    name: Harmonica
    url: https://harmonica.chat
servers:
  - url: https://app.harmonica.chat/api/v1
    description: Production
  - url: http://localhost:3000/api/v1
    description: Local development
security:
  - apiKey: []
paths:
  /sessions:
    get:
      tags:
        - Sessions
      summary: List sessions
      description: >
        Returns sessions the authenticated user has access to (owns or
        participates in).

        Results are ordered by most recently updated first.
      operationId: listSessions
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - active
              - completed
          description: Filter by session status
        - name: q
          in: query
          schema:
            type: string
          description: Search sessions by topic or goal
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          description: Number of results per page
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
            minimum: 0
          description: Number of results to skip
        - name: distribution_channel
          in: query
          schema:
            type: string
            enum:
              - telegram
          description: Filter by distribution channel
        - name: distribution_group_id
          in: query
          schema:
            type: string
          description: Filter by distribution group ID
      responses:
        '200':
          description: List of sessions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SessionListItem'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - data
                  - pagination
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SessionListItem:
      type: object
      description: Abbreviated session object returned in list endpoints.
      properties:
        id:
          type: string
          format: uuid
        topic:
          type: string
        goal:
          type: string
        status:
          type: string
          enum:
            - active
            - completed
        participant_count:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - topic
        - goal
        - status
        - participant_count
        - created_at
        - updated_at
    Pagination:
      type: object
      properties:
        total:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
      required:
        - total
        - limit
        - offset
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden
                - not_found
                - validation_error
                - rate_limited
                - internal_error
                - unprocessable
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid or missing API key
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: |
        API key authentication. Pass your key as a Bearer token.
        Keys use the format `hm_live_<32 hex chars>`.
        Generate keys from your Harmonica dashboard settings.

````