Skip to main content
GET
/
api
/
{session}
/
labels
/
{labelId}
/
chats
Get conversations by label
curl --request GET \
  --url https://{host}/api/{session}/labels/{labelId}/chats \
  --header 'apikey: <api-key>'
{
  "labelId": "label123",
  "labelName": "VIP Clients",
  "chats": [
    {
      "id": "5511999999999@s.whatsapp.net",
      "name": "John Silva",
      "lastMessage": "Hello!",
      "timestamp": 1699999999
    },
    {
      "id": "5511888888888@s.whatsapp.net",
      "name": "Maria Santos",
      "lastMessage": "Thank you!",
      "timestamp": 1699999998
    }
  ]
}

Description

This endpoint returns all chats that have a specific label applied, allowing you to filter chats by category.

URL Parameters

session
string
required
WhatsApp unique session ID
labelId
string
required
ID of the label to filter chats

Response

chats
array
List of conversations that have the specified label
{
  "labelId": "label123",
  "labelName": "VIP Clients",
  "chats": [
    {
      "id": "5511999999999@s.whatsapp.net",
      "name": "John Silva",
      "lastMessage": "Hello!",
      "timestamp": 1699999999
    },
    {
      "id": "5511888888888@s.whatsapp.net",
      "name": "Maria Santos",
      "lastMessage": "Thank you!",
      "timestamp": 1699999998
    }
  ]
}

Status Codes

  • 200 - Chats returned successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized
  • 404 - Label not found

Usage Example

curl -X GET https://api.wappfy.com.br/api/my-session/labels/label123/chats

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Path Parameters

labelId
string
required
I