Manages the configuration of webhooks to receive real-time instance events. Allows managing multiple webhooks per instance via the ID and action fields.
Easiest usage - no ID complexity:
action or id in the payload"excludeMessages": ["wasSentByApi"] to avoid loops{"url": "https://mysite.com/webhook", "events": ["messages"], "excludeMessages": ["wasSentByApi"]}To test webhooks during development:
For users who need multiple webhooks per instance:
💡 Tip: Even if you need multiple webhooks, consider using addUrlEvents in simple mode.
A single webhook can receive different event types at specific URLs
(e.g., /webhook/message, /webhook/connection), eliminating the need for multiple webhooks.
Create New Webhook:
action: "add"id in payloadUpdate Existing Webhook:
action: "update"id in payloadRemove Webhook:
action: "delete"idconnection: Changes in connection statehistory: Receiving message historymessages: New messages receivedmessages_update: Updates to existing messagescall: VoIP call eventscontacts: Contact list updatespresence: Presence status changesgroups: Group modificationslabels: Label managementchats: Chat eventschat_labels: Chat label changesblocks: Blocks/unblocksleads: Lead updatessender: Campaign updates, when started, and when completedFilter out messages based on filters:
wasSentByApi: Messages originated by the API ⚠️ IMPORTANT: Always use this filter to avoid loops in automationswasNotSentByApi: Messages not originated by the APIfromMeYes: Messages sent by the userfromMeNo: Messages received from othersisGroupYes: Messages in groupsisGroupNo: Messages in individual chats💡 Loop Prevention: If you have automations that send messages via API, always include "excludeMessages": ["wasSentByApi"] in your webhook. If you prefer receiving these events, ensure your automation detects messages sent by the API itself to avoid infinite loops.
Supported Actions:
add: Register new webhookdelete: Remove existing webhookURL Parameters:
addUrlEvents (boolean): When active, adds the event type as a path parameter in the URL.
Example: https://api.example.com/webhook/{event}addUrlTypesMessages (boolean): When active, adds the message type as a path parameter in the URL.
Example: https://api.example.com/webhook/{message_type}Parameter Combinations:
https://api.example.com/webhook/{event}/{message_type}
Real example: https://api.example.com/webhook/message/conversationhttps://api.example.com/webhook/messagehttps://api.example.com/webhook/conversationTechnical Notes:
URL to receive events
"https://example.com/webhook"
Unique webhook ID (required for update/delete)
"123e4567-e89b-12d3-a456-426614174000"
Enables/disables the webhook
true
List of monitored events
connection, history, messages, messages_update, call, contacts, presence, groups, labels, chats, chat_labels, blocks, leads Filters to exclude message types
wasSentByApi, wasNotSentByApi, fromMeYes, fromMeNo, isGroupYes, isGroupNo Adds the event type as a parameter in the URL.
false (default): Normal URLtrue: Adds event in URL (e.g., /webhook/message)Adds the message type as a parameter in the URL.
false (default): Normal URLtrue: Adds message type (e.g., /webhook/conversation)Action to be performed:
add, update, delete Webhook configured or updated successfully
URL de destino dos eventos
Tipos de eventos monitorados
connection, history, messages, messages_update, call, contacts, presence, groups, labels, chats, chat_labels, blocks, leads ID único gerado automaticamente
ID da instância associada
Webhook ativo/inativo
Incluir na URLs o tipo de mensagem
Incluir na URL o nome do evento
Filtros para excluir tipos de mensagens
wasSentByApi, wasNotSentByApi, fromMeYes, fromMeNo, isGroupYes, IsGroupNo Data de criação (automática)
Data da última atualização (automática)