Skip to main content
Webhooks allow real-time integration between the l2msg WhatsApp API and WhatsApp™, enabling automated data synchronization and sharing. This feature is exactly what makes it possible to create self-service bots and multi-service systems.

Enabling Webhooks

  • By calling the /webhook/instance endpoint

Instance Webhook Events

Most users will prefer instance-based activation, as it makes it easier to control the received events. However, in some cases, a global webhook is necessary. This can be done using the global webhook variable. Here is an example with some common events being listened to:
/webhook/instance

Parameters

It is extremely necessary that the payload follows the rules to create a JSON file, considering the correct arrangement of items, formatting, brackets, braces, commas, etc. Before consuming the endpoint, if you have doubts about the JSON formatting, go to https://jsonlint.com/ and validate.

Supported Events

These are the available and supported webhook events:

Locating Webhook

If necessary, there is an option to locate any active webhook on the specific instance.

Data returned from the request:

Calling the endpoint will return all information about the webhook being used by the instance.
Result