Help Desk
  • Getting Started
    • ๐Ÿ™ŒWelcome to Whapi.Cloud
    • ๐Ÿ’ฐPricing
    • โ˜•Partners
    • ๐Ÿš€Getting started
    • ๐Ÿ‘จโ€๐Ÿ’ปAPI Docs
      • Developer hubs
      • Swagger environment
      • Postman collection
  • Sending
    • Introduction
    • Send text message
      • Whatsapp API send message PHP
      • Whatsapp API send message Python
      • Whatsapp API send message Node JS
      • Whatsapp API send message ะก#
      • Whatsapp API send message Java
      • API integration with VB6
      • Whatsapp API send message GO (Golang)
    • Send video, audio, image, document
      • How to send file from your local computer using the API
    • Send Group message
    • Send post to WhatsApp Channel
    • Send message with Buttons
    • Send Emoji
    • Overview of other methods for sending
      • Send Voice message
      • Send contact (vCard)
      • Send message reactions
  • Receiving
    • Introduction
    • Webhooks
      • Our webhooks (Tracked events)
      • Where to Find the Webhook URL?
      • Set the webhook link to the channel
      • Detailed webhook settings
      • How to check the webhook?
      • Incoming webhooks format
        • Incoming message
        • Sent message
        • Chats
          • How to Track Chat Labels via Webhook
        • Groups
        • Communities
        • Contacts
        • Account and device status
        • Other
          • Calls
          • Presences
          • Labels
          • Views of stories (statuses)
          • Story (status) from your contacts
      • Receive messages
        • Receive WhatsApp messages using PHP
        • Receive WhatsApp messages using Node js
        • Receive WhatsApp messages using Python
    • HTTP API
      • How to retrieve files
      • Retrieve a Specific User's Chat History
      • Get a full-size picture in the response
      • Get order items
      • Get a profile picture of a chat or user
    • File expiration period
  • Groups
    • Send Group message
      • Mentioning all participants in a WhatsApp group
    • Get list of group members
    • Add new member to Group
  • Channels
    • Send post to WhatsApp Channel
    • Get messages from Channels
    • Get votes from polls in the Channel
  • Communities
    • Introduction
    • Create a community
    • Add a member to a community
    • Send announcement
    • Get info on community participants
    • Add a group / Exclude a group from the community
  • Account
    • Setting "Auto Download"
    • Customizable Webhook Headers
    • How to find out the IP channel
    • How to Delete a Channel
    • Add Business Info to Invoice
  • Source code
    • WhatsApp ChatBot
      • WhatsApp Python Bot
      • WhatsApp PHP Bot
      • WhatsApp Node JS Bot
      • WhatsApp Java Bot
    • WhatsApp API Google Sheets
    • WhatsApp Phone Number Checker
    • Request Distributor (Balancer)
  • FAQ
    • Does WhatsApp API work with the phone turned off?
    • Chat ID. What is it and how to get it?
    • Why do I see status "pending" after sending message?
    • How to send a paragraph (line break)
    • Inactive Links in WhatsApp Messages
    • WhatsApp Text Formatting
    • Checking if the number has Whatsapp
    • Specifics of sending messages to numbers of different countries
    • Current status of Buttons on WhatsApp
    • Why aren't participants being added to the group?
  • Hints
    • Android Emulators
    • Virtual Numbers for WhatsApp
    • How to use polls as buttons?
    • How to check who blocked you in Whatsapp?
    • Setting up a WhatsApp proxy
  • Integrations
    • Make.com
      • Ready-Made Scenarios
        • WhatsApp & Whisper API: Voice-to-Text Integration
        • Automated WhatsApp Group Message Forwarding in Make.com
      • Request Scenario Setup
    • Pabbly Connect
    • Google Contacts
    • DialogFlow
    • n8n
  • Tools
    • WhatsApp Number Checker
    • Automatic warm-up module
    • WhatsApp Activity Safety Meter
    • Residential Proxies from Whapi.Cloud
  • Troubleshooting
    • Couldn't Link Device โ€“ WhatsApp QR Code or Pairing Code Fails
    • Channel status โ€œSYNC_ERRORโ€
    • Not getting a READ status on webhook
    • 429 (Too Many Requests) - Soft Ban
    • โ€œWaiting for this message. This may take a whileโ€ โ€“ WhatsApp Message Error
    • Missing push notifications after connecting to API
  • Blocking
    • How to not get Banned?
    • How to do mailings without the risk of being blocked?
    • If My Number Is Banned, Can It Be Restored?
    • Unlocking Your WhatsApp Number
    • Connecting a New WhatsApp Number After a Ban: Steps and Recommendations
    • Warming Up New Phone Numbers for WhatsApp API
  • Partner Documentation
    • Introduction
    • Partner Dashboard Overview
    • Partner Program Guidelines
      • Workflow: Step-by-Step
      • Billing for Partners
      • Allocating Days to Customer Channels: Best Practices & Guide
      • Interface for channel management
    • Partner Documentation
      • Channel creation
      • Changing channel mode
      • Channel extension
      • Channel deletion
      • Getting the list of channels
      • Notices of end of days on balance
Powered by GitBook
On this page
  • Created a new chat with an incoming message
  • Created a new chat with an outgoing message
  • The chat has been deleted
  • Chat changes: label installed/removed, chat set to mute/unmute
  • The disappearing message settings in chat have been changed
  • Format

Was this helpful?

  1. Receiving
  2. Webhooks
  3. Incoming webhooks format

Chats

Webhooks that Whapi.Cloud will generate regarding your chats.

PreviousSent messageNextHow to Track Chat Labels via Webhook

Last updated 11 days ago

Was this helpful?

You can find more details about all parameters and their types in .

The chats array contains all chats that were sent to the webhook URL. We mentioned more about the events here:

Created a new chat with an incoming message

Use the chats.post setting to get this webhook.

{
  "chats": [
    {
      "id": "919984351847@s.whatsapp.net",
      "type": "contact",
      "timestamp": 1747660332,
      "unread": 1,
      "not_spam": true
    }
  ],
  "event": {
    "type": "chats",
    "event": "post"
  },
  "channel_id": "MANTIS-M72HC"
}

Created a new chat with an outgoing message

Use the chats.post setting to get this webhook.

{
  "chats": [
    {
      "id": "919984351847@s.whatsapp.net",
      "type": "contact",
      "timestamp": 1712995377,
      "not_spam": true
    }
  ],
  "event": {
    "type": "chats",
    "event": "post"
  },
  "channel_id": "MANTIS-M72HC"
}

The chat has been deleted

Use the chats.delete setting to get this webhook.

{
  "chats_removed": [
    "919984351847@s.whatsapp.net"
  ],
  "event": {
    "type": "chats",
    "event": "delete"
  },
  "channel_id": "MANTIS-M72HC"
}

Chat changes: label installed/removed, chat set to mute/unmute

Pay attention to the information that has been updated in the changes array.

{
  "chats_updates": [
    {
      "before_update": {
        "id": "919984351847@s.whatsapp.net",
        "type": "contact",
        "timestamp": 1747059575,
        "name": "Jonathan",
        "mute_until": 18446744073709552000,
        "not_spam": true,
        "last_message": {
          "id": "yqJjeEsm3q7aMd8-gIcNRJKDPQ",
          ............................
          "from_name": "Whapi"
        }
      },
      "after_update": {
        "id": "919984351847@s.whatsapp.net",
        "type": "contact",
        "timestamp": 1747059575,
        "name": "Jonathan",
        "mute": true,
        "mute_until": 18446744073709552000,
        "not_spam": true,
        "last_message": {
          "id": "yqJjeEsm3q7aMd8-gIcNRJKDPQ",
          ............................
          "from_name": "Whapi"
         }
      },
        "labels": [
          {
            "id": "3",
            "name": "Pending payment",
            "color": "salmon"
          }
        ]
      },
      "changes": [
        "last_message",
        "labels",
        "mute",
        "mute_until"
      ]
    }
  ],
  "event": {
    "type": "chats",
    "event": "patch"
  },
  "channel_id": "MANTIS-M72HC"
}

Some nuances and peculiarities

To track which label is set on a chat, simply enable the chats.patch webhook. It includes the current label in the payload whenever the chat is updated. This is the easiest way to get label info without making an HTTP API request.

To track group name or icon changes, enable the groups.patch webhook.

The disappearing message settings in chat have been changed

Use the messages.post setting to get this webhook.

{
  "messages": [
    {
      "id": "PrBhEFkXhz2gFVU-gNASij1GoQ",
      "from_me": false,
      "type": "action",
      "chat_id": "919984351847@s.whatsapp.net",
      "timestamp": 1747661045,
      "source": "system",
      "device_id": 20,
      "chat_name": "Jonathan",
      "action": {
        "type": "ephemeral",
        "
      },
      "from": "919984351847",
      "from_name": "Jonathan"
    }
  ],
  "event": {
    "type": "messages",
    "event": "post"
  },
  "channel_id": "MANTIS-M72HC"
}

Format

id*

ChatID string pattern: ^[\d-]{10,31}@[\w\.]{1,}$

Chat ID

name

string example: Chat name

Chat name

type*

string example: group

Chat type

Enum: [ group, contact, broadcast, newsletter ]

timestamp

integer example: 1675964377

Chat timestamp

chat_pic

string example: https://example.com/photo.jpg

Chat picture URL

chat_pic_full

string example: https://example.com/photo.jpg

Chat full picture URL

pin

boolean example: true

Is chat pinned

mute

boolean example: true

Is chat muted

mute_until

integer example: 0

Chat mute until

archive

boolean example: true

Is chat archived

unread

integer example: 0

Unread messages count

unread_mention

boolean example: false

Is chat unread mention

read_only

boolean example: false

Is chat read only

not_spam

boolean example: true

Is chat not spam

last_message

labels

Use the chats.patch setting to get this webhook. Note that chats.patch sends notifications putting in the callback information that was there before the entity was updated and after the entity was updated, showing the difference and what has changed. We have described this in more detail here:

Message

{...}
the WebHook documentation
Mode setting
Webhook Events and Update Types (POST / PUT / PATCH / DELETE)