Quick Start
Follow these steps to configure and receive webhooks from Evolution Go.Prerequisites
Before configuring webhooks, you need:- Evolution Go installed and running — see the installation guide
- An instance created — see Getting Started
- Your API Key (
GLOBAL_API_KEYconfigured in.env) - An accessible URL to receive events
Step 1: Connect the instance with webhook
Configure the webhook when connecting your instance by sending a request to the connection endpoint.Method
Header
Body
cURL Example
JavaScript Example
Python Example
Step 2: Pair with WhatsApp
After connecting, you will receive aQRCode event on your webhook with the QR Code image in base64:
- Open WhatsApp on your phone
- Go to Settings > Linked Devices > Link a Device
- Scan the QR Code received on your webhook (decode the
qrcodebase64 field to display the image)
If you prefer to use Pairing Code instead of QR Code, send the
phone field in the body:Step 3: Confirm the connection
After successful pairing, you will receive a sequence of events:PairSuccess → Connected → OfflineSyncCompleted. If you received these 3 events, your webhook is correctly configured.
Step 4: Receive messages
From now on, every message received on WhatsApp will be sent as aMessage event to your URL.
Processing on your server
Detailed Configuration
Webhook configuration is done when connecting an instance, through thePOST /instance/connect endpoint.
Instance Webhook
When connecting an instance, you can set the webhook URL and the events you want to receive:POST /instance/connect
Parameters
Global Webhook
You can set a global webhook via environment variable. It will receive events from all instances, in addition to each instance’s individual webhooks..env
When configured, both webhooks are triggered: the global one (defined by
WEBHOOK_URL) and the instance one (defined in webhookUrl). This allows having a centralized monitoring system alongside instance-specific integrations.Event Types
When configuring the webhook, you can subscribe to the following event types:Payload Structure
All webhooks are sent asHTTP POST requests with Content-Type: application/json. The base payload structure is:
Event Payloads
QRCode
Emitted when a new QR Code is generated for pairing.PairSuccess
Emitted when device pairing is successfully completed.Message
Emitted when a message is received. The payload varies depending on the message type. All message events share the same base structure indata, with the Info object containing metadata and Message containing the content.
Common Info object fields
Additional common fields
Text
Image
WhenWEBHOOK_FILES=true (default), the base64 field contains the encoded image. If MinIO/S3 is configured, mediaUrl is added instead of base64.
Video
Audio
Document
When
WEBHOOK_FILES=true (default), messages with media include the file content as base64 within the Message object. If MinIO/S3 is configured, the mediaUrl field is added instead of base64.Receipt
Emitted for read and delivery confirmations. Thestate field at root level indicates the type: Read, ReadSelf, or Delivered.
Connected
Emitted when the instance successfully connects to WhatsApp.LoggedOut
Emitted when the instance is disconnected from WhatsApp.OfflineSyncCompleted
Emitted when the offline message synchronization is completed after reconnection.CallOffer
Emitted when a call is received.CallRelayLatency
Emitted with latency information during an ongoing call.CallTerminate
Emitted when a call is ended.JoinedGroup
Emitted when the instance joins a group.GroupInfo
Emitted when group information is updated (name, description, participants, etc.).NewsletterJoin
Emitted when the instance joins a channel/newsletter.Retry Policy
Evolution Go has an automatic retry system to ensure webhook delivery:
If all 5 attempts fail, the event is discarded and an error log is recorded.
Alternative Delivery Channels
In addition to HTTP webhooks, Evolution Go supports other event delivery channels:RabbitMQ / AMQP
Send via AMQP queues. Configure with
rabbitmqEnable: "enabled" on instance connection and the AMQP_URL, AMQP_GLOBAL_ENABLED, and AMQP_GLOBAL_EVENTS variables.NATS
Send via NATS messaging. Configure with
natsEnable: "enabled" on connection and the NATS_URL, NATS_GLOBAL_ENABLED, and NATS_GLOBAL_EVENTS variables.WebSocket
Receive events in real-time via WebSocket. Configure with
websocketEnable: "enabled" on instance connection.Multiple channels can be activated simultaneously. For example, you can receive events via HTTP webhook and RabbitMQ at the same time.