Skip to main content
Webhooks allow Evolution Go to send real-time notifications to your application when events occur on WhatsApp, such as receiving messages, connection updates, calls, and more.

Quick Start

Follow these steps to configure and receive webhooks from Evolution Go.

Prerequisites

Before configuring webhooks, you need:
  1. Evolution Go installed and running — see the installation guide
  2. An instance created — see Getting Started
  3. Your API Key (GLOBAL_API_KEY configured in .env)
  4. An accessible URL to receive events
For quick testing, use webhook.site to generate a temporary URL and view received events in real-time. For local development, use ngrok to expose your local server to the internet.

Step 1: Connect the instance with webhook

Configure the webhook when connecting your instance by sending a request to the connection endpoint.

Method

The API Key is the value of the GLOBAL_API_KEY variable configured in the Evolution Go .env file. Never expose this key publicly. See more details in Getting Started.

Body

cURL Example

JavaScript Example

Python Example

Step 2: Pair with WhatsApp

After connecting, you will receive a QRCode event on your webhook with the QR Code image in base64:
  1. Open WhatsApp on your phone
  2. Go to Settings > Linked Devices > Link a Device
  3. Scan the QR Code received on your webhook (decode the qrcode base64 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: PairSuccessConnectedOfflineSyncCompleted. 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 a Message event to your URL.

Processing on your server

Your endpoint must respond with an HTTP 2xx status (200-299) within 30 seconds. Otherwise, Evolution Go will retry up to 5 times with a 30-second interval between each attempt.

Detailed Configuration

Webhook configuration is done when connecting an instance, through the POST /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:
Use "ALL" in the subscribe list to receive all events without needing to list each one individually.

Payload Structure

All webhooks are sent as HTTP 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 in data, with the Info object containing metadata and Message containing the content.

Common Info object fields

Additional common fields

Text

Image

When WEBHOOK_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. The state 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.
Make sure your webhook endpoint responds with an HTTP 2xx status (200-299) to confirm receipt. Any response outside this range will be treated as a failure and will trigger a retry.

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.

Environment Variables

All environment variables related to events and webhooks: