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

# Get Session

> Get information of a specific session

## Description

This endpoint returns detailed information about a specific session, including its current status (active, paused, authenticated, etc.) and configurations.

## URL Parameters

<ParamField path="session" type="string" required>
  Unique session ID to be queried
</ParamField>

## Response

<ResponseField name="session" type="string" required>
  ID of the session
</ResponseField>

<ResponseField name="status" type="string" required>
  Current status of the session: "active", "stopped", "disconnected", "authenticated"
</ResponseField>

<ResponseField name="authenticated" type="boolean" required>
  Indicates if the session is authenticated on WhatsApp
</ResponseField>

<ResponseField name="config" type="object" optional>
  Session configurations (if available)
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "session": "my-session",
    "status": "authenticated",
    "authenticated": true,
    "config": {
      "store": {
        "dialect": "sqlite3",
        "address": "/app/data/whatsmeow.db"
      },
      "log": {
        "level": "INFO"
      }
    }
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Information obtained successfully
* `400` - Invalid parameters
* `404` - Session not found

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.wappfy.com.br/api/sessions/my-session
  ```

  ```javascript JavaScript theme={null}
  const session = 'my-session';
  const response = await fetch(`https://api.wappfy.com.br/api/sessions/${session}`);
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  session = 'my-session'
  response = requests.get(f'https://api.wappfy.com.br/api/sessions/{session}')
  data = response.json()
  print(data)
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/sessions/{session}
openapi: 3.1.0
info:
  title: Wappfy - WhatsApp HTTP API
  version: '2.0'
  contact: {}
servers:
  - url: https://{host}
    description: Customizable Server
    variables:
      host:
        default: api.wappfy.com.br
        description: Server URL (e.g., api.wappfy.com.br or your-server.com)
security:
  - api_key: []
tags:
  - name: 🖥️ Sessions
    description: Control WhatsApp sessions (accounts)
  - name: 🔑 Auth
    description: Authentication
  - name: 🆔 Profile
    description: Your profile information
  - name: 🖼️ Screenshot
    description: Get WhatsApp screenshot and display QR code
  - name: 📤 Chatting
    description: Conversation methods
  - name: 📢 Channels
    description: Channels (newsletters) methods
  - name: 🟢 Status
    description: Status (aka stories) methods
  - name: 💬 Chats
    description: Conversations methods
  - name: 👤 Contacts
    description: |-
      Contacts methods.<br>
                      Use phone number (without +) or phone number and `@c.us` at the end as `contactId`.<br>
                      E.g: `12312312310` OR `12312312310@c.us`<br>
  - name: 👥 Groups
    description: Groups methods.<br>
  - name: ✅ Presence
    description: Presence information
  - name: 📅 Events
    description: Event Message
  - name: 🏷️ Labels
    description: Labels - available only for WhatsApp Business accounts
  - name: 🔍 Observability
    description: Other methods
  - name: 🗄️ Storage
    description: Storage methods
externalDocs:
  description: Wappfy - WhatsApp API
  url: https://docs.wappfy.com.br/
paths:
  /api/sessions/{session}:
    get:
      tags:
        - 🖥️ Sessions
      summary: Get session information
      description: The {session} parameter must be the session's instanceName.
      operationId: SessionsController_get
      parameters:
        - name: session
          required: true
          in: path
          description: The session name (instanceName) you want to query
          example: my-session
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionInfo'
      security:
        - api_key: []
components:
  schemas:
    SessionInfo:
      type: object
      properties:
        name:
          type: string
          example: default
          description: Session instance name. Use 'session' as default value
        me:
          $ref: '#/components/schemas/MeInfo'
        assignedWorker:
          type: string
        status:
          enum:
            - STOPPED
            - STARTING
            - SCAN_QR_CODE
            - WORKING
            - FAILED
          type: string
        config:
          $ref: '#/components/schemas/SessionConfig'
      required:
        - name
        - status
    MeInfo:
      type: object
      properties:
        id:
          type: string
          example: 5511999999999@c.us
        pushName:
          type: string
      required:
        - id
        - pushName
    SessionConfig:
      type: object
      properties:
        metadata:
          example:
            user.id: '123'
            user.email: email@example.com
          description: Metadata for the session. You'll get 'metadata' in all webhooks.
          allOf:
            - $ref: '#/components/schemas/Map'
        proxy:
          example: null
          allOf:
            - $ref: '#/components/schemas/ProxyConfig'
        debug:
          type: boolean
          default: false
        noweb:
          example:
            store:
              enabled: true
              fullSync: false
          allOf:
            - $ref: '#/components/schemas/NowebConfig'
        webhooks:
          type: array
          items:
            $ref: '#/components/schemas/WebhookConfig'
    Map:
      type: object
      properties: {}
    ProxyConfig:
      type: object
      properties:
        server:
          type: string
          example: localhost:3128
        username:
          type: string
          example: null
        password:
          type: string
          example: null
      required:
        - server
    NowebConfig:
      type: object
      properties:
        markOnline:
          type: boolean
          default: true
          description: Mark the session as online when it connects to the server.
        store:
          $ref: '#/components/schemas/NowebStoreConfig'
      required:
        - markOnline
    WebhookConfig:
      type: object
      properties:
        url:
          type: string
          example: https://webhook.site/11111111-1111-1111-1111-11111111
          description: >-
            You can use https://docs.webhook.site/ to test webhooks and see the
            payload
        events:
          example:
            - message
            - session.status
          type: array
          items:
            type: object
        hmac:
          example: null
          allOf:
            - $ref: '#/components/schemas/HmacConfiguration'
        retries:
          example: null
          allOf:
            - $ref: '#/components/schemas/RetriesConfiguration'
        customHeaders:
          example: null
          type: array
          items:
            $ref: '#/components/schemas/CustomHeader'
      required:
        - url
        - events
    NowebStoreConfig:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
          description: Enable or disable the store for contacts, chats, and messages.
          example: true
        fullSync:
          type: boolean
          default: false
          description: >-
            Enable full sync on session initialization (when scanning QR code).

            Full sync will download all contacts, chats, and messages from the
            phone.

            If disabled, only messages early than 90 days will be downloaded and
            some contacts may be missing.
      required:
        - enabled
        - fullSync
    HmacConfiguration:
      type: object
      properties:
        key:
          type: string
          example: your-secret-key
    RetriesConfiguration:
      type: object
      properties:
        delaySeconds:
          type: number
          example: 2
        attempts:
          type: number
          example: 15
        policy:
          enum:
            - linear
            - exponential
            - constant
          type: string
          example: linear
    CustomHeader:
      type: object
      properties:
        name:
          type: string
          example: X-My-Custom-Header
        value:
          type: string
          example: Value
      required:
        - name
        - value
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````