Skip to main content
GET
/
api
/
{session}
/
labels
/
chats
/
{chatId}
Get labels for the conversation
curl --request GET \
  --url https://{host}/api/{session}/labels/chats/{chatId} \
  --header 'apikey: <api-key>'
{
  "chatId": "5511999999999@s.whatsapp.net",
  "labels": [
    {
      "id": "label123",
      "name": "VIP Clients",
      "color": 1
    },
    {
      "id": "label456",
      "name": "Support",
      "color": 2
    }
  ]
}

Description

This endpoint returns all labels that are currently applied to a specific chat, allowing you to visualize how the chat is categorized.

URL Parameters

session
string
required
WhatsApp unique session ID
chatId
string
required
ID of the chat (JID of the contact or group)

Response

labels
array
List of labels applied to the chat
{
  "chatId": "5511999999999@s.whatsapp.net",
  "labels": [
    {
      "id": "label123",
      "name": "VIP Clients",
      "color": 1
    },
    {
      "id": "label456",
      "name": "Support",
      "color": 2
    }
  ]
}

Status Codes

  • 200 - Labels returned successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized
  • 404 - Chat not found

Usage Example

curl -X GET https://api.wappfy.com.br/api/my-session/labels/chats/5511999999999@s.whatsapp.net

Authorizations

apikey
string
header
required

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

Path Parameters

chatId
string
required

Conversation ID

Response

200 - application/json
id
string
required

Label ID

Example:

"1"

name
string
required

Label name

Example:

"Lead"

color
number
required

Color number, not hex

Example:

0

colorHex
string
required

Color in hex

Example:

"#ff9485"

I