> ## 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 All Contacts

> Get complete list of all contacts from the session

## Description

This endpoint returns a complete list of all contacts available in the WhatsApp session, without pagination. Use this endpoint when you need all contacts at once.

## Query Parameters

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

<ResponseExample>
  ```json Success Response theme={null}
  {
    "contacts": [
      {
        "jid": "5511999999999@s.whatsapp.net",
        "name": "John Silva",
        "notify": "John",
        "verifiedName": "John Silva",
        "businessName": ""
      },
      {
        "jid": "5511888888888@s.whatsapp.net",
        "name": "Maria Santos",
        "notify": "Maria",
        "verifiedName": "Maria Santos",
        "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}
  curl -X GET "https://api.wappfy.com.br/api/contacts/all?sessionId=my-session"
  ```

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

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

  session_id = 'my-session'
  response = requests.get(
      'https://api.wappfy.com.br/api/contacts/all',
      params={'sessionId': session_id}
  )
  data = response.json()
  print(data)
  print(f"Total contacts: {len(data['contacts'])}")
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/contacts/all
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/all:
    get:
      tags:
        - 👤 Contacts
      summary: Get all contacts
      operationId: ContactsController_getAll
      parameters:
        - name: sortBy
          required: false
          in: query
          description: Sort by field
          schema:
            enum:
              - id
              - name
            type: string
        - name: sortOrder
          required: false
          in: query
          description: >-
            Sort order - <b>desc</b>ending (Z => A, New first) or
            <b>asc</b>ending (A => Z, Old first)
          schema:
            enum:
              - desc
              - asc
            type: string
        - name: limit
          required: false
          in: query
          schema:
            type: number
        - name: offset
          required: false
          in: query
          schema:
            type: number
      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)

````