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

# Check if Number is Registered on WhatsApp

> Check if a phone number is registered on WhatsApp

## Description

This endpoint checks if a specific phone number is registered and active on WhatsApp. Useful for validating numbers before sending messages.

## Query Parameters

<ParamField query="sessionId" type="string" required>
  Authenticated session ID
</ParamField>

<ParamField query="phone" type="string" required>
  Phone number to be checked (international format, numbers only). Example: `5511999999999`
</ParamField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "exists": true,
    "jid": "5511999999999@s.whatsapp.net",
    "isInWhatsapp": true
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Verification completed successfully
* `400` - Invalid parameters
* `401` - Unauthorized session
* `404` - Session not found

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.wappfy.com.br/api/contacts/check-exists?sessionId=my-session&phone=5511999999999"
  ```

  ```javascript JavaScript theme={null}
  const sessionId = 'my-session';
  const phone = '5511999999999';
  const response = await fetch(
    `https://api.wappfy.com.br/api/contacts/check-exists?sessionId=${sessionId}&phone=${phone}`
  );
  const data = await response.json();
  if (data.exists && data.isInWhatsapp) {
    console.log(`Number ${phone} is registered on WhatsApp!`);
    console.log(`JID: ${data.jid}`);
  } else {
    console.log(`Number ${phone} is not on WhatsApp`);
  }
  ```

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

  session_id = 'my-session'
  phone = '5511999999999'
  response = requests.get(
      'https://api.wappfy.com.br/api/contacts/check-exists',
      params={
          'sessionId': session_id,
          'phone': phone
      }
  )
  data = response.json()
  if data.get('exists') and data.get('isInWhatsapp'):
      print(f"Number {phone} is registered on WhatsApp!")
      print(f"JID: {data['jid']}")
  else:
      print(f"Number {phone} is not on WhatsApp")
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/contacts/check-exists
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/contacts/check-exists:
    get:
      tags:
        - 👤 Contacts
      summary: Check if the phone number is registered on WhatsApp
      operationId: ContactsController_checkExists
      parameters:
        - name: phone
          required: true
          in: query
          description: The phone number to check
          example: '1213213213'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WANumberExistResult'
      security:
        - api_key: []
components:
  schemas:
    WANumberExistResult:
      type: object
      properties:
        chatId:
          type: string
          example: Chat id for the phone number. Undefined if the number does not exist
        numberExists:
          type: boolean
      required:
        - numberExists
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````