Skip to main content
WaGo can push WhatsApp events to a webhook URL.

Configure webhook URL

curl -X POST http://localhost:1337/webhook \
  -H "Content-Type: application/json" \
  -H "token: YOUR_TOKEN" \
  -d '{
    "WebhookURL": "https://app.example.com/wago/webhook"
  }'
The URL is stored on the token row and cached for the running process.

Read webhook settings

curl -H "token: YOUR_TOKEN" \
  http://localhost:1337/webhook
The response includes webhook and subscribe.

Subscribe to events

Subscriptions are set during POST /session/connect or POST /session/pair:
{
  "Subscribe": ["Message", "ReadReceipt", "Presence", "Call"],
  "Immediate": true,
  "Phone": ""
}
Valid event values from code:
Message, ReadReceipt, Presence, HistorySync, ChatPresence, Call, All, Newsletter, LoggedOut

Webhook reliability

Your webhook receiver should:
  • Return a 2xx response quickly.
  • Validate that the request came from your WaGo deployment.
  • Store the raw event before doing slow work.
  • Be idempotent by message ID or event ID.
  • Handle duplicate events.