---
updatedAt: 2026-06-29T04:20:01.000Z
agentTools:
  projectIndex: https://docs.verihubs.com/llms.txt
---

# WhatsApp Webhook

By subscribing to our webhooks, our services will hit the subscribing webhooks URL with `POST` request which contains JSON body payload. Do note that only WABA that's owned by your company can subscribe to the webhook.

Here's how to subscribe to a webhook that will be sent to the Webhook URL you input.

1. Click WhatsApp > Manage WhatsApp > Integration Settings
2. Click Add Setting

<Image align="center" caption="WhatsApp > Manage WhatsApp > Integration Settings" src="https://files.readme.io/0b8e1a473d371bdea29492ee8a75c1eac3e8d611d88360ae0bcbf347a4dea072-image.png" />

3. Select Application Name. WhatsApp Channel Details will appear based on the Application Name you selected.

<Image align="center" caption="Integration Settings > Add Setting" src="https://files.readme.io/76c9e0d03ed5fb5767d7f698bdf59e7f0c4c846cf8ed061ca19be788279e4ae9-image.png" />

4. Select Inbound Configuration > Webhook (Manual Handling)

<Image align="center" caption="Webhook (Manual Handling)" src="https://files.readme.io/0e1927fe0853375d086e408560e4391630cb5bd58dbbac2d4e3a635159c45102-image.png" />

5. Enter the Webhook URL as the destination to receive the Webhook POST response from Verihubs.

<Image align="center" caption="Input Webhook URL" src="https://files.readme.io/94e3d7395adcbbbf2a84a50d8a99b582a2f05e6f5433f8d2a024550fa93aef9a-image.png" />

6. If you require authorization to access the Webhook URL, you can enable Authorization by checking the checkbox provided.

<Image align="center" caption="Authorization Checkbox" src="https://files.readme.io/38a4b0f52d2ea4c2b1ef3e5e9ae976342439d43803c6a101844c42edd54f4254-image.png" />

7. If you check the Authorization checkbox, you can enter a token with the provided Bearer prefix corresponding to the Authorization token to access the URL you entered initially.

<Image align="center" caption="Input Token" src="https://files.readme.io/37d9e0585d04a8426956312056803e3ca71d2779b95aaef6197ef4dcc6ebc11d-image.png" />

8. For Message Events, the explanation is as follows.

## Events Available for Subscription:

* Message Created : "message\_created"
  * this event will be triggered when a user or the WABA created a message
* Message Updated : "message\_updated"
  * this event will be triggered when there's an update to a message, usually a status update
  * e.g. a message just changed its status to read

> **DEVELOPER NOTE:** : The webhook events will not instantly reflect the changes of unsubscribing an event

<Image align="center" caption="Message Event" src="https://files.readme.io/8909b3605306e9c2d2e98559e6212c44d0059460c1db0efa6d58e6a0c2fa1e32-image.png" />

9. Once you've selected the desired Message Event, you can click "`Add Now` to create Webhook Settings.
10. Your Webhook Settings will be ready, and with every request you send, Verihubs will send a Webhook Response to the URL you entered.

<Image align="center" caption="Integration Settings" src="https://files.readme.io/59b8661e8eaeb057052ca2c1a81fa2daa2b4d387ca8ccb4a82b62bca6fcb0470-image.png" />

## Webhook Request Payload

**The webhook JSON body will consist of:**

* event : event string
* contact : contact object
  * id : contact id
  * display\_name: WA display name or the msisdn, WA display name will mostly appear if the user sent a message to the WA first.
  * msisdn : the msisdn with dial code
* conversation : conversation object
  * id : conversation id
  * created\_at : when did the conversation first started
* message : message object

  * id : message id
  * channel\_id : channel id (tied to your business WA number)
  * direction : "received" or "sent", depends whether the message is inbound or outbound
  * from : the msisdn string of sender
  * to : the msisdn string of recipient
  * whatsapp\_status : the whatsapp status of the message
    * for inbound message the status will be mostly "received" or "deleted" (message deleted by sender)
    * for outbound message it'll follow whatsapp status of "pending", "sent", "delivered", "read", "failed", "rejected", "deleted"
  * type : type of the message
    * text
    * hsm (only for outbound messages)
    * image
    * video
    * audio
    * file
    * location
  * content : content of the message

    * text content:

      ```json
      {
          "text": "Hello"
      }
      ```
    * image content (contains download url):

      ```json
      {
          "image": {
              "url": "https://media.test.com/v1/54317df2-2eb8-42f3-be15-32ef877c3942"
          }
      }
      ```
    * audio content (contains download url):

      ```json
      {
          "audio": {
              "url": "https://media.test.com/v1/54317df2-2eb8-42f3-be15-32ef877c3942"
          }
      }
      ```
    * video content (contains download url):

      ```json
      {
          "video": {
              "url": "https://media.test.com/v1/54317df2-2eb8-42f3-be15-32ef877c3942"
          }
      }
      ```
    * file content (contains download url):

      ```json
      {
          "file": {
              "url": "https://media.test.com/v1/54317df2-2eb8-42f3-be15-32ef877c3942",
              "caption": "original-file-name.pdf"
          }
      }
      ```
    * location content:

      ```json
      {
          "location": {
              "latitude": -6.174095,
              "longitude": 106.87536
          }
      }
      ```

## JSON Payload Example for message\_created

```json
{
  "entry": [
    {
      "changes": [
        {
          "field": "messages",
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "string",
              "phone_number_id": "string"
            },
            "contacts": [
              {
                "wa_id": "string",
                "identity_key_hash": "string",
                "profile": {
                  "name": "string"
                }
              }
            ],
            "statuses": [
              {
                "id": "string",
                "status": "string",
                "timestamp": "string",
                "recipient_id": "string",
                "recipient_user_id": "string",
                "conversation": {
                  "id": "string",
                  "expiration_timestamp": "string",
                  "origin": {
                    "type": "string"
                  }
                },
                "pricing": {
                  "billable": "boolean",
                  "category": "string",
                  "pricing_model": "string",
                  "type": "string"
                },
                "errors": null
              }
            ]
          }
        }
      ],
      "id": "string"
    }
  ],
  "object": "whatsapp_business_account",
  "verihubs_session_id": "string",
  "verihubs_status": "int"
}
```

## JSON Payload Example for message\_updated

```json
{
  "entry": [
    {
      "changes": [
        {
          "field": "messages",
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "string",
              "phone_number_id": "string"
            },
            "contacts": [
              {
                "wa_id": "string",
                "identity_key_hash": "string",
                "profile": {
                  "name": "string"
                }
              }
            ],
            "statuses": [
              {
                "id": "string",
                "status": "string",
                "timestamp": "string",
                "recipient_id": "string",
                "recipient_user_id": "string",
                "conversation": {
                  "id": "string",
                  "expiration_timestamp": "string",
                  "origin": {
                    "type": "string"
                  }
                },
                "pricing": {
                  "billable": "boolean",
                  "category": "string",
                  "pricing_model": "string",
                  "type": "string"
                },
                "errors": null
              }
            ]
          }
        }
      ],
      "id": "string"
    }
  ],
  "object": "whatsapp_business_account",
  "verihubs_session_id": "string",
  "verihubs_status": "int"
}
```