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

# Get session

> Returns details of a specific session



## OpenAPI

````yaml /api-reference/openapi.selfhost.json get /api/sessions/{session}
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Self-hosted Polymorfa REST, tenant-account, and instance-administration API.
    Use the generated operations for exact request and response schemas. SaaS
    Console-only routes are not included.
  title: Polymorfa API
  version: '1.0'
servers:
  - url: https://your-instance.example.com
    description: Your self-hosted instance
security:
  - ApiKey: []
tags:
  - description: >-
      Manage WhatsApp Channels (newsletters): create, follow/unfollow,
      mute/unmute, and retrieve channel information.
    name: channels
  - description: >-
      Register webhook endpoints to receive real-time events (messages, status
      changes, group updates, etc.). Configure event filtering, retry policies,
      HMAC signature verification, and custom headers.
    name: webhooks
  - description: >-
      Resolve WhatsApp Linked Device IDs (LIDs) to phone numbers (PNJIDs) and
      vice versa.
    name: lids
  - description: Server version and status information. No authentication required.
    name: info
  - description: >-
      Send messages (text, image, video, audio, document, location, contact,
      poll), mark messages as read, send typing indicators, and react to
      messages with emoji.
    name: messages
  - description: >-
      Manage chat-level operations: edit sent messages, delete messages, and
      archive/unarchive conversations.
    name: chats
  - description: >-
      Read and write online/offline presence status. Subscribe to presence
      updates for specific contacts to receive real-time typing and online
      notifications via webhooks.
    name: presence
  - description: >-
      Create, update, and delete WhatsApp Business labels. Assign labels to
      chats for organization and filtering.
    name: labels
  - description: >-
      Full group management: create groups, update subject/description/picture,
      manage participants (add, remove, promote, demote), handle invite links,
      and join groups.
    name: groups
  - description: >-
      Read and update your WhatsApp profile: display name, status text, and
      profile picture.
    name: profile
  - description: >-
      Download and manage media files (images, videos, documents) from received
      messages. Media can be downloaded on-demand or auto-persisted to
      S3-compatible storage.
    name: media
  - description: >-
      Health check and readiness probes for load balancers and orchestrators. No
      authentication required.
    name: health
  - description: Manage your tenant account and API keys (SaaS edition).
    name: account
  - description: >-
      Configure instance settings: rate limits, debug mode, S3 storage, and
      license info (self-hosted edition).
    name: settings
  - description: >-
      Link a WhatsApp account to a session using QR code scanning or phone
      number pairing code. After creating a session, use one of these methods to
      authenticate it with WhatsApp.
    name: pairing
  - description: >-
      Look up contacts, check phone number registration on WhatsApp, retrieve
      profile pictures, and manage your block list.
    name: contacts
  - description: Administrative endpoints for tenant management (SaaS edition).
    name: admin
  - description: Create, list, rotate, and revoke API keys (self-hosted edition).
    name: keys
  - description: >-
      Create, start, stop, and manage WhatsApp sessions. A session represents a
      single WhatsApp account connection. Sessions must be paired via QR code or
      pairing code before they can send or receive messages.
    name: sessions
paths:
  /api/sessions/{session}:
    get:
      tags:
        - sessions
      summary: Get session
      description: Returns details of a specific session
      operationId: getSession
      parameters:
        - description: Session name
          in: path
          name: session
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal server error
        default:
          content:
            application/json:
              schema:
                properties:
                  docs:
                    description: Link to relevant API documentation
                    type: string
                  error:
                    description: Human-readable error message
                    type: string
                type: object
          description: Error response
components:
  schemas:
    Session:
      properties:
        config:
          description: Session configuration as JSON
          type: object
        createdAt:
          description: When the session was created
          type: string
        name:
          description: Session identifier (e.g. "default")
          type: string
        proxy:
          description: HTTP/HTTPS proxy URL for WhatsApp connections
          type: string
        runnerId:
          description: Runner pod currently managing this session
          type: string
        status:
          description: 'Current status: CONNECTING, CONNECTED, or DISCONNECTED'
          type: string
        statusReason:
          description: Reason for the current status (e.g. SCAN_QR, FAILED, LOGGED_OUT)
          type: string
        tenantId:
          description: Tenant that owns this session
          type: string
        updatedAt:
          description: When the session was last updated
          type: string
      type: object
    UnauthorizedError:
      properties:
        error:
          description: Human-readable error message
          example: missing or invalid API key
          type: string
      type: object
    NotFoundError:
      properties:
        docs:
          description: Link to relevant API documentation
          example: https://docs.polymorfa.com/api/sessions
          type: string
        error:
          description: Human-readable error message
          example: session not found
          type: string
      type: object
    InternalServerError:
      properties:
        error:
          description: Human-readable error message
          example: internal server error
          type: string
      type: object
  securitySchemes:
    ApiKey:
      description: Scoped API key created via POST /api/account/keys.
      scheme: bearer
      type: http

````