Skip to main content

Webhooks

SUPPORTED WEBHOOK EVENTS

Webhooks enable real-time integration between the Evolution API and WhatsApp™, allowing automated data synchronization and sharing.

It is exactly this feature that enables the creation of self-service bots and multi-service systems.

These are the available and supported webhook events::

Env NameAPI EventDescription
APPLICATION_STARTUPapplication.startupNotifies you when an application startup.
QRCODE_UPDATEDqrcode.updatedSends the base64 of the qrcode for reading
CONNECTION_UPDATEconnection.updateInforms the status of the connection with WhatsApp
MESSAGES_SETmessage.setSends a list of all your messages uploaded on WhatsApp. This event occurs only once
MESSAGES_UPSERTmessage.upsertNotifies you when a message is received
MESSAGES_UPDATEmessage.updateTells you when a message is updated
MESSAGES_DELETEmessage.deleteTells you when a message is deleted
SEND_MESSAGEsend.messageNotifies when a message is sent
CONTACTS_SETcontacts.setPerforms initial loading of all contacts.This event occurs only once
CONTACTS_UPSERTcontacts.upsertReloads all contacts with additional information.This event occurs only once
CONTACTS_UPDATEcontacts.updateInforms you when the chat is updated
PRESENCE_UPDATEpresence.updateInforms if the user is online, if he is performing some action like writing or recording and his last seen: 'unavailable', 'available', 'composing', 'recording', 'paused'
CHATS_SETchats.setSend a list of all loaded chats
CHATS_UPDATEchats.updateInforms you when the chat is updated
CHATS_UPSERTchats.upsertSends any new chat information
GROUPS_UPSERTgroups.upsertNotifies when a group is created
GROUPS_UPDATEgroups.updateNotifies when a group has its information updated
GROUP_PARTICIPANTS_UPDATEgroup-participants.updateNotifies when an action occurs involving a participant: 'add', 'remove', 'promote', 'demote'
NEW_TOKENnew.jwtNotifies when the token (jwt) is updated

WEBHOOK ROUTES

When enabling the WEBHOOK_BY_EVENTS options in the global and local webhooks, the following paths will be added at the end of the webhook.

Example:

Assuming your webhook url was https://sub.domain.com/webhook-test/exclusive-webhook-code, for the QRCODE_UPDATED event the complete url would look like this:

https://sub.domain.com/webhook-test/exclusive-webhook-code/qrcode-updated

Below is a breakdown of the suffixes added to the end of the webhook url for each of the events:

APPLICATION_STARTUP: /application-startup
QRCODE_UPDATED: /qrcode-updated
CONNECTION_UPDATE: /connection-update
MESSAGES_SET: /messages-set
MESSAGES_UPSERT: /messages-upsert
MESSAGES_UPDATE: /messages-update
MESSAGES_DELETE: /messages-delete
SEND_MESSAGES: /send-messages
CONTACTS_SET: /contacts-set
CONTACTS_UPSERT: /contacts-upsert
CONTACTS_UPDATE: /contacts-update
PRESENCE_UPDATE: /presence-update
CHATS_SET: /chats-set
CHATS_UPDATE: /chats-update
CHATS_UPSERT: /chats-upsert
GROUPS_UPSERT: /groups-upsert
GROUPS_UPDATE: /groups-update
GROUP_PARTICIPANTS_UPDATE: /groups-participants-update
NEW_TOKEN: /new-token