> ## 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 Presence for the Chat

> Get presence information (online/offline) of a specific chat

## Description

**⚠️ This endpoint is not yet implemented.**

This endpoint will allow you to get presence information (online/offline status) of a specific contact or chat. Useful for checking if a contact is available before sending messages.

## URL Parameters

<ParamField path="session" type="string" required>
  WhatsApp unique session ID
</ParamField>

<ParamField path="chatId" type="string" required>
  ID of the chat/contact in format `5511999999999@s.whatsapp.net`
</ParamField>

## Response

<ResponseExample>
  ```json Success Response (Future Example) theme={null}
  {
    "chatId": "5511999999999@s.whatsapp.net",
    "status": "AVAILABLE",
    "lastSeen": 1234567890,
    "isOnline": true
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Information obtained successfully
* `400` - Invalid parameters
* `401` - Unauthorized
* `404` - Chat not found

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.wappfy.com.br/api/my-session/presence/5511999999999@s.whatsapp.net
  ```

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

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

  session = 'my-session'
  chat_id = '5511999999999@s.whatsapp.net'
  response = requests.get(f'https://api.wappfy.com.br/api/{session}/presence/{chat_id}')
  data = response.json()
  print(data)
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/{session}/presence/{chatId}
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/{session}/presence/{chatId}:
    get:
      tags:
        - ✅ Presence
      summary: >-
        Get presence for the conversation ID. If not subscribed - also
        subscribes
      description: The {session} parameter must be the session's instanceName.
      operationId: PresenceController_getPresence
      parameters:
        - name: chatId
          required: true
          in: path
          description: Conversation ID
          example: 123456789@c.us
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WAHAChatPresences'
      security:
        - api_key: []
components:
  schemas:
    WAHAChatPresences:
      type: object
      properties:
        id:
          type: string
          description: Chat ID - either group id or contact id
          example: 5511999999999@c.us
        presences:
          type: array
          items:
            $ref: '#/components/schemas/WAHAPresenceData'
      required:
        - id
        - presences
    WAHAPresenceData:
      type: object
      properties:
        participant:
          type: string
          description: Chat ID - participant or contact id
          example: 5511999999999@c.us
        lastSeen:
          type: number
          example: 1686568773
        lastKnownPresence:
          type: string
          enum:
            - offline
            - online
            - typing
            - recording
            - paused
      required:
        - participant
        - lastKnownPresence
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````