> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook for Messages & Status Changes in ChatSyncs

> The four independent webhook triggers on a bot's Webhook tab — Incoming/Outgoing Message, Message Status, and Conversation Status Change — and how to use each.

Send every message a bot receives (and every reply it sends) to your own server, in real time —
plus two more triggers for status changes, all on the same **Webhook** tab in Bot Settings.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-01-webhook-tab-nav.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=69d53f5bffa27237d5042ce4f90f307e" alt="ChatSyncs left navigation with Chatbot Manager selected, Bot Settings button highlighted, and the Webhook tab selected showing Send incoming or outgoing messages to external webhook URLs" width="1897" height="812" data-path="images/learn/webhook-messages-and-status/step-01-webhook-tab-nav.png" />
</Frame>

## Four independent triggers

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-02-all-four-webhook-triggers.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=813e46f22ce809985fd8b96553841b57" alt="Webhook tab with all four triggers and their URL fields: Trigger Webhook for Incoming Message with Webhook URL for Incoming Messages, Trigger Webhook for Outgoing Message with Outgoing Webhook URL, Trigger Webhook for Message Status Change with Message Status Change Webhook URL, and Trigger Webhook for Conversation Status Change with Conversation Status Webhook URL" width="1119" height="800" data-path="images/learn/webhook-messages-and-status/step-02-all-four-webhook-triggers.png" />
</Frame>

| Trigger                        | Fires when                                                                | Typical use                                                  |
| ------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------ |
| **Incoming Message**           | A customer sends the bot a message.                                       | CRM logging, support tickets, ERP integration.               |
| **Outgoing Message**           | The bot sends a reply.                                                    | Store conversation history, reporting, performance tracking. |
| **Message Status Change**      | A sent message's delivery status changes (sent, delivered, read, failed). | Track delivery failures, confirm read receipts.              |
| **Conversation Status Change** | The conversation's status changes (resolved, archived, blocked, etc.).    | Sync conversation state into an external helpdesk or CRM.    |

Each trigger is independent — enable any combination, and each has its own **Webhook URL** field
so they can point at the same endpoint or four different ones.

<Steps>
  <Step title="Open Webhook">
    Go to **Chatbot Manager**, select your bot, click **Bot Settings**, then the **Webhook** tab.
  </Step>

  <Step title="Enable the trigger(s) you need">
    Turn on any of the four toggles.
  </Step>

  <Step title="Enter each Webhook URL">
    Fill in the URL field that appears under each enabled toggle.
  </Step>

  <Step title="Publish Changes">
    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-03-publish-changes-button.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=57df8d1e13634575a911f7e206415727" alt="Bot Settings header with the Publish Changes button highlighted, after entering webhook URLs" width="1258" height="783" data-path="images/learn/webhook-messages-and-status/step-03-publish-changes-button.png" />
    </Frame>

    After pasting in your webhook URL(s), click **Publish Changes** — nothing goes live until you
    do.
  </Step>
</Steps>

## Examples

Every trigger POSTs a JSON body. These are real captured payloads (subscriber phone number,
name, and endpoint replaced with placeholders) — every receiving tool (n8n, Make, your own
server) wraps the single event in a one-item array like this.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-04-example-payload-capture.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=8d517fd7820413979ed30d284f1ad9cc" alt="n8n Webhook node showing a captured test event with the raw JSON payload in the Output panel" width="1837" height="769" data-path="images/learn/webhook-messages-and-status/step-04-example-payload-capture.png" />
</Frame>

<Tip>
  Point a trigger's Webhook URL at a tool like n8n, Make, or webhook.site first and click **Listen
  for test event** (or equivalent) — send yourself a real message, and you'll see the exact payload
  shape for your account before you build anything downstream.
</Tip>

**Incoming Message** — a customer sends *"Hi"*.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-05-incoming-message-toggle.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=b910febe1ec27c2a0b64861ca095bf21" alt="Webhook tab with Trigger Webhook for Incoming Message enabled and its Webhook URL field filled in" width="1075" height="325" data-path="images/learn/webhook-messages-and-status/step-05-incoming-message-toggle.png" />
</Frame>

Your server receives:

```json theme={null}
{
  "whatsapp_bot_name": "Bengaluru rent",
  "whatsapp_bot_id": 419957,
  "subscriber_id": "919876543210-419957",
  "wa_message_id": "wamid.HBgMOTE5ODc2NTQzMjEw...",
  "label_names": "batch2",
  "custom_fields": {
    "Phone_Number": "919876543210",
    "custom_fields": {
      "city": "Hyderabad",
      "product": "Laptop"
    }
  },
  "first_name": "Rahul",
  "chat_id": "919876543210",
  "user_message": "Hi",
  "whatsapp_bot_username": "+91 98765 43210"
}
```

`custom_fields` carries every Custom Field currently saved on that subscriber — here `city` and
`product` — alongside the message itself in `user_message`.

**Outgoing Message** — the bot sends a reply.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-06-outgoing-message-toggle.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=e24051d4c97c1b6ba222a6b4f4be76bc" alt="Webhook tab with Trigger Webhook for Outgoing Message enabled and its Outgoing Webhook URL field filled in" width="1062" height="178" data-path="images/learn/webhook-messages-and-status/step-06-outgoing-message-toggle.png" />
</Frame>

Your server receives:

```json theme={null}
{
  "whatsapp_bot_name": "Bengaluru rent",
  "whatsapp_bot_id": 419957,
  "subscriber_id": "919876543210-419957",
  "wa_message_id": "wamid.HBgTSU4uMTUyNjg5MzA1NTQ3NDg3OA...",
  "label_names": "batch2",
  "first_name": "Rahul",
  "chat_id": "919876543210",
  "whatsapp_bot_username": "+91 98765 43210"
}
```

<Warning>
  In this captured payload, the outgoing message's own text isn't included — only subscriber and
  message-ID metadata. If your integration needs the actual reply content, verify this against
  your own capture (see the Tip above) rather than assuming it's present.
</Warning>

**Message Status Change** — a sent message moves from `sent` → `delivered` → `read`, or fails.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-07-message-status-toggle.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=b350a17e76211b57e04277a5294382b9" alt="Webhook tab with Trigger Webhook for Message Status Change enabled and its Message Status Change Webhook URL field filled in" width="647" height="181" data-path="images/learn/webhook-messages-and-status/step-07-message-status-toggle.png" />
</Frame>

Your server receives, on each transition:

```json theme={null}
{
  "whatsapp_bot_name": "Bengaluru rent",
  "whatsapp_bot_id": 419957,
  "subscriber_id": "919876543210-419957",
  "wa_message_id": "wamid.HBgTSU4uMTUyNjg5MzA1NTQ3NDg3OA...",
  "label_names": "batch2",
  "webhook_type": "message_status_change",
  "message_status": "delivered",
  "status_time": "2026-08-20 02:15:05",
  "failed_reason": null,
  "first_name": "Rahul",
  "chat_id": "919876543210",
  "whatsapp_bot_username": "+91 98765 43210"
}
```

`message_status` is one of `sent`, `delivered`, `read`, or `failed` — when it's `failed`,
`failed_reason` carries the reason instead of `null`.

**Conversation Status Change** — an agent marks a conversation **Resolved** in the Shared Inbox
(or via the [Mark Conversation Status API](/developer-api/subscriber/mark-conversation-status)).

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/webhook-messages-and-status/step-08-conversation-status-toggle.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=68dd98df8de07c19672203fa71903116" alt="Webhook tab with Trigger Webhook for Conversation Status Change enabled and its Conversation Status Webhook URL field filled in" width="612" height="184" data-path="images/learn/webhook-messages-and-status/step-08-conversation-status-toggle.png" />
</Frame>

Your server receives:

```json theme={null}
{
  "whatsapp_bot_name": "Bengaluru rent",
  "whatsapp_bot_id": 419957,
  "subscriber_id": "919876543210-419957",
  "wa_message_id": "",
  "label_names": "",
  "event": "conversation.resolved",
  "action": "resolved",
  "action_status": "1",
  "agent_name": "Priya",
  "changed_at": "2026-08-29 02:38:21",
  "first_name": "Rahul",
  "chat_id": "919876543210",
  "whatsapp_bot_username": "+91 98765 43210"
}
```

* **`event`** — a namespaced identifier for what happened, e.g. `conversation.resolved`.
* **`action`** — the plain status name: one of `resolved`, `reopen`, `archived`, `unarchived`,
  `blocked`, or `unblocked` — the same states as the [Mark Conversation Status
  API](/developer-api/subscriber/mark-conversation-status).
* **`action_status`** — `"1"` confirms the change actually succeeded.
* **`agent_name`** — which team member (or system) made the change.
* **`changed_at`** — when it happened, in your account's local time.
* **`wa_message_id`** and **`label_names`** arrive empty here — a conversation status change
  isn't tied to one specific message or label, unlike the other three triggers.

## Frequently asked

<AccordionGroup>
  <Accordion title="Do I have to enable all four triggers together?">
    No — each toggle and its URL field is independent. Enable only the ones you actually need.
  </Accordion>

  <Accordion title="Can each trigger send to a different URL?">
    Yes — every trigger has its own Webhook URL field, so you can route incoming messages to one
    system and status changes to another.
  </Accordion>

  <Accordion title="What's the difference between Message Status Change and Conversation Status Change?">
    **Message Status Change** tracks one message's delivery lifecycle (sent/delivered/read/failed).
    **Conversation Status Change** tracks the whole conversation's state (resolved, archived,
    blocked, etc.) — see [Mark Conversation Status](/developer-api/subscriber/mark-conversation-status)
    for the same states via the API.
  </Accordion>

  <Accordion title="Where do I enable these?">
    **Chatbot Manager → \[your bot] → Bot Settings → Webhook** tab — see [How Do I Turn On
    Webhook Triggers for My Bot?](/learn/chatsyncs-bot-settings/turn-on-webhook-triggers-for-my-bot-with-chatsyncs) for the full Bot Settings
    reference.
  </Accordion>
</AccordionGroup>
