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

# List all sessions for the tenant



## OpenAPI

````yaml /api-reference/openapi.json get /api/sessions
openapi: 3.0.3
info:
  title: Polymorfa WhatsApp API
  version: 0.0.0
  description: >-
    Public Polymorfa REST API for sessions, messaging, media, webhooks,
    campaigns, templates, client tokens, widgets, and bridge routing.
  contact:
    name: Polymorfa API
    url: https://docs.polymorfa.com
servers:
  - url: https://api.polymorfa.com
security:
  - BearerAuth: []
paths:
  /api/sessions:
    get:
      tags:
        - Sessions
      summary: List all sessions for the tenant
      operationId: listSessions
      responses:
        '200':
          description: Session list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsResponse'
        '400':
          description: Bad request — request body or params failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but not permitted (missing scope or rule violation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ListSessionsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/Session'
      required:
        - success
        - data
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        docs:
          type: string
          description: URL to the documentation for this error
      required:
        - error
    Session:
      type: object
      properties:
        sessionId:
          type: string
          description: >-
            Canonical per-org session identifier. Use this in
            /api/sessions/{session}/* paths.
        name:
          type: string
        tenantId:
          type: string
        connection:
          type: string
          enum:
            - linked_device
            - cloud_api
          description: >-
            How the session connects to WhatsApp. 'linked_device' pairs as a
            WhatsApp linked device; 'cloud_api' uses the Meta Cloud API.
            Immutable after create.
        testMode:
          type: boolean
          description: Whether this session was created as a simulated testing number.
        status:
          type: string
          description: 'Current status: CONNECTING, CONNECTED, or DISCONNECTED'
        statusReason:
          type: string
        runnerId:
          type: string
        proxy:
          type: string
        config:
          type: object
          additionalProperties:
            nullable: true
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - name
        - tenantId
        - connection
        - testMode
        - status
        - config
        - createdAt
        - updatedAt
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (titan_ prefix), project token (titan_pt_
        prefix), or client token (titan_ct_ prefix), where the operation permits
        that audience.

````