> ## 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 Basic Contact Information

> Get basic information of WhatsApp contacts

## Description

This endpoint allows getting basic information of contacts on WhatsApp. You can search for a specific contact by providing the JID or list multiple contacts using pagination.

## Query Parameters

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

<ParamField query="jid" type="string" optional>
  Contact identifier (WhatsApp JID). If provided, returns only the specific contact. Format: `5511999999999@s.whatsapp.net`
</ParamField>

<ParamField query="limit" type="number" optional default="100">
  Limit of contacts returned (default: 100)
</ParamField>

<ParamField query="offset" type="number" optional default="0">
  Offset for pagination (default: 0)
</ParamField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "contacts": [
      {
        "jid": "5511999999999@s.whatsapp.net",
        "name": "John Silva",
        "notify": "John",
        "verifiedName": "John Silva",
        "businessName": ""
      }
    ]
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Contacts returned successfully
* `400` - Invalid parameters
* `401` - Unauthorized session
* `404` - Session not found

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  # Get specific contact
  curl -X GET "https://api.wappfy.com.br/api/contacts?sessionId=my-session&jid=5511999999999@s.whatsapp.net"

  # List contacts with pagination
  curl -X GET "https://api.wappfy.com.br/api/contacts?sessionId=my-session&limit=50&offset=0"
  ```

  ```javascript JavaScript theme={null}
  // Get specific contact
  const sessionId = 'my-session';
  const jid = '5511999999999@s.whatsapp.net';
  const response = await fetch(
    `https://api.wappfy.com.br/api/contacts?sessionId=${sessionId}&jid=${jid}`
  );
  const data = await response.json();
  console.log(data);

  // List contacts with pagination
  const response2 = await fetch(
    `https://api.wappfy.com.br/api/contacts?sessionId=${sessionId}&limit=50&offset=0`
  );
  const data2 = await response2.json();
  console.log(data2);
  ```

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

  # Get specific contact
  session_id = 'my-session'
  jid = '5511999999999@s.whatsapp.net'
  response = requests.get(
      'https://api.wappfy.com.br/api/contacts',
      params={
          'sessionId': session_id,
          'jid': jid
      }
  )
  data = response.json()
  print(data)

  # List contacts with pagination
  response2 = requests.get(
      'https://api.wappfy.com.br/api/contacts',
      params={
          'sessionId': session_id,
          'limit': 50,
          'offset': 0
      }
  )
  data2 = response2.json()
  print(data2)
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/contacts
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:
    get:
      tags:
        - 👤 Contacts
      summary: Get basic contact information
      description: >-
        The method always returns a result, even if the phone number is not
        registered on WhatsApp. For this - use the /contacts/check-exists
        endpoint below
      operationId: ContactsController_get
      parameters:
        - name: contactId
          required: true
          in: query
          example: 5511999999999@c.us
          schema:
            type: string
      responses:
        '200':
          description: ''
      security:
        - api_key: []
components:
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````