Skip to main content
POST
/
chat
/
findChats
/
:instanceName
curl --request POST \
  --url https://api.example.com/chat/findChats/my-instance \
  --header 'apikey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "limit": 20,
    "offset": 0
  }'
{
  "chats": [
    {
      "id": "chat_123",
      "remoteJid": "[email protected]",
      "owner": "my-instance",
      "isGroup": false,
      "name": "John Doe",
      "createdAt": "2024-03-04T10:30:00.000Z",
      "updatedAt": "2024-03-04T12:45:00.000Z"
    },
    {
      "id": "chat_456",
      "remoteJid": "[email protected]",
      "owner": "my-instance",
      "isGroup": true,
      "name": "Project Team",
      "createdAt": "2024-03-03T15:20:00.000Z",
      "updatedAt": "2024-03-04T11:30:00.000Z"
    }
  ],
  "total": 2
}

Overview

You can fetch all chats from your WhatsApp instance using this endpoint. It supports advanced filtering through query parameters to help you find specific chats based on various criteria.
This endpoint returns both individual and group chats. Use the isGroup field in the response to distinguish between them.

Authentication

This endpoint requires authentication via the apikey header.
header.apikey
string
required
Your Evolution API key for authentication.

Path Parameters

path.instanceName
string
required
The name of your WhatsApp instance.

Request Body

The request body accepts a query object for filtering and pagination:
where
object
Filter criteria for chats.
limit
number
default:"20"
Maximum number of chats to return.
offset
number
default:"0"
Number of chats to skip (for pagination).
sort
object
Sorting configuration.

Response

chats
array
Array of chat objects.
total
number
Total number of chats matching the query.
curl --request POST \
  --url https://api.example.com/chat/findChats/my-instance \
  --header 'apikey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "limit": 20,
    "offset": 0
  }'
{
  "chats": [
    {
      "id": "chat_123",
      "remoteJid": "[email protected]",
      "owner": "my-instance",
      "isGroup": false,
      "name": "John Doe",
      "createdAt": "2024-03-04T10:30:00.000Z",
      "updatedAt": "2024-03-04T12:45:00.000Z"
    },
    {
      "id": "chat_456",
      "remoteJid": "[email protected]",
      "owner": "my-instance",
      "isGroup": true,
      "name": "Project Team",
      "createdAt": "2024-03-03T15:20:00.000Z",
      "updatedAt": "2024-03-04T11:30:00.000Z"
    }
  ],
  "total": 2
}

Build docs developers (and LLMs) love