Skip to main content
WaGo sends webhook events when the connected WhatsApp session receives messages, receipts, presence updates, call updates, logout events, and other account changes.

Delivery format

WaGo sends webhooks as POST requests using form data, not a raw JSON request body. Every normal webhook contains:
Form fieldMeaning
tokenThe WaGo session token that produced the event. Use it to map the event to one of your users or devices.
jsonDataA JSON string. Parse this field to get the event payload.
When media file forwarding is enabled and WaGo downloads an inbound media file, the webhook is sent as multipart form data with the same fields plus:
Form fieldMeaning
fileThe downloaded image, audio, video, document, or sticker file.
Receiver example:
app.post("/wago/webhook", upload.single("file"), (req, res) => {
  const token = req.body.token;
  const event = JSON.parse(req.body.jsonData);
  const file = req.file;

  res.sendStatus(200);
});

Event envelope

Most jsonData values follow this shape:
{
  "type": "Message",
  "event": {}
}
type is the WaGo subscription/event name. event is the underlying WhatsApp event object, with fields such as Info, Message, MessageIDs, Timestamp, From, State, or call metadata depending on event type. Some event types include extra WaGo fields next to event:
FieldAdded forMeaning
stateReadReceipt, PresenceNormalized status such as Delivered, Read, ReadSelf, online, or offline.
decryptVoteMessage poll updatesHex hash for a decrypted selected poll option.
orderDetailsMessage order messagesOrder data fetched from WhatsApp when an order message contains orderID and token.

Subscribe values

Subscriptions are set in POST /session/connect or POST /session/pair.
{
  "Subscribe": ["Message", "ReadReceipt", "Presence", "ChatPresence", "Call", "LoggedOut"],
  "Immediate": true,
  "Phone": ""
}
Supported public subscription names:
Subscribe valueEvents included
AllSends all public webhook event types.
MessageInbound and outbound message events from chats.
NewsletterMessage events whose source is a newsletter/channel.
ReadReceiptDelivered/read receipts for messages.
PresenceOnline/offline updates for users.
ChatPresenceTyping and recording indicators inside a chat.
HistorySyncHistorical sync payloads from WhatsApp after login or reconnect.
CallCall offer, accept, terminate, relay latency, and WaGo managed-call state events.
LoggedOutSession was logged out or unpaired.
Use All while integrating. In production, subscribe only to the event types your app needs.

Message event

Use Message events to process inbound chat messages, outgoing messages from linked devices, media messages, poll updates, order messages, edits, and newsletter messages. Example text message:
{
  "type": "Message",
  "event": {
    "Info": {
      "Chat": "[email protected]",
      "Sender": "[email protected]",
      "IsFromMe": false,
      "IsGroup": false,
      "ID": "3EB0F7A1B2C3D4E5",
      "PushName": "Customer",
      "Timestamp": "2026-06-25T10:30:00Z",
      "Type": "text"
    },
    "Message": {
      "conversation": "Hello"
    },
    "IsEphemeral": false,
    "IsViewOnce": false,
    "IsEdit": false
  }
}
Important fields:
FieldMeaning
event.Info.IDWhatsApp message ID. Store this for replies, reactions, edits, deletes, receipts, or audit logs.
event.Info.ChatChat JID where the message belongs.
event.Info.SenderSender JID. In groups this is the participant who sent it.
event.Info.IsFromMetrue when the message was sent by the connected account or another linked device.
event.Info.IsGrouptrue for group or broadcast contexts.
event.MessageThe actual WhatsApp message payload. The inner field depends on message type.
Common event.Message branches:
Message fieldMeaning
conversationSimple text message.
extendedTextMessageText with context, preview, quote, or formatting data.
imageMessageImage metadata and caption.
audioMessageAudio metadata.
videoMessageVideo metadata and caption.
documentMessageDocument metadata, file name, and caption.
stickerMessageSticker metadata.
locationMessageLatitude/longitude message.
contactMessagevCard contact message.
pollUpdateMessagePoll vote update. WaGo tries to decrypt the vote and adds decryptVote.
orderMessageBusiness order message. WaGo tries to fetch orderDetails.

Media message with file upload

If the binary runs with webhook file forwarding enabled, WaGo downloads supported inbound media and sends the file with the webhook request. Example jsonData for image media:
{
  "type": "Message",
  "event": {
    "Info": {
      "Chat": "[email protected]",
      "Sender": "[email protected]",
      "ID": "3EB0IMAGE",
      "Timestamp": "2026-06-25T10:31:00Z",
      "MediaType": "image"
    },
    "Message": {
      "imageMessage": {
        "caption": "Payment proof",
        "mimetype": "image/jpeg",
        "fileLength": 54231
      }
    }
  }
}
The HTTP request also includes file. Save it in your app before responding. Supported auto-forwarded file types in WaGo:
WhatsApp messageFile behavior
ImageDownloaded and attached as file.
AudioDownloaded and attached as file.
DocumentDownloaded and attached as file.
VideoDownloaded and attached as file.
StickerDownloaded and attached as file.
If file forwarding is disabled, use the message metadata and media download endpoints to fetch media later.

Read receipt event

Use ReadReceipt events to update message delivery state in your app.
{
  "type": "ReadReceipt",
  "state": "Delivered",
  "event": {
    "Chat": "[email protected]",
    "Sender": "[email protected]",
    "IsFromMe": true,
    "MessageIDs": ["3EB0F7A1B2C3D4E5"],
    "Timestamp": "2026-06-25T10:32:00Z",
    "Type": "delivered",
    "MessageSender": "[email protected]"
  }
}
state values added by WaGo:
StateMeaning
DeliveredWhatsApp delivered the message.
ReadRecipient read the message.
ReadSelfAnother linked device for the same account read the message.

Presence event

Use Presence events for online/offline user state.
{
  "type": "Presence",
  "state": "online",
  "event": {
    "From": "[email protected]",
    "Unavailable": false,
    "LastSeen": "0001-01-01T00:00:00Z"
  }
}
When state is offline, LastSeen may be zero if the contact hides last seen.

Chat presence event

Use ChatPresence for typing and recording indicators.
{
  "type": "ChatPresence",
  "event": {
    "Chat": "[email protected]",
    "Sender": "[email protected]",
    "IsFromMe": false,
    "IsGroup": false,
    "State": "composing",
    "Media": "text"
  }
}
Common values:
FieldValues
Statecomposing, paused
Mediatext, audio

Call event

WaGo sends two kinds of call-related webhooks:
  1. Raw WhatsApp call events such as offer, accept, terminate, offer notice, and relay latency.
  2. Managed-call events from the WaGo call layer, such as incoming, state, ready, and ended.
Raw call offer example:
{
  "type": "Call",
  "event": {
    "From": "[email protected]",
    "Timestamp": "2026-06-25T10:33:00Z",
    "CallCreator": "[email protected]",
    "CallID": "CALL_ID",
    "RemotePlatform": "android",
    "RemoteVersion": "2.26.1"
  }
}
Managed incoming call example:
{
  "type": "Call",
  "event": {
    "action": "incoming",
    "callID": "CALL_ID",
    "peer": "[email protected]",
    "phase": "ringing",
    "phaseCode": 2
  }
}
Managed call state example:
{
  "type": "Call",
  "event": {
    "action": "state",
    "callID": "CALL_ID",
    "peer": "[email protected]",
    "phase": "active",
    "phaseCode": 4
  }
}
Use callID with /call/answer, /call/reject, /call/hangup, /call/status, and live audio endpoints.

Logged out event

Use LoggedOut to detect that the WhatsApp session is no longer linked.
{
  "type": "LoggedOut",
  "event": {
    "Reason": 401
  }
}
When WaGo receives this event, it marks the session disconnected. Your app should show the user a reconnect or scan flow.

History sync event

HistorySync arrives when WhatsApp sends historical messages after login or reconnect.
{
  "type": "HistorySync",
  "event": {
    "Data": {
      "syncType": "INITIAL_BOOTSTRAP"
    }
  }
}
History sync payloads can be large. If your app does not need historical import, do not subscribe to HistorySync.

Account and app-state events

WaGo also forwards several account-state event types. These are useful for dashboards and sync jobs, but most apps can ignore them unless they need account administration details.
TypeWhat it means
SyncCompleteOffline sync finished after reconnect.
LabelEditA WhatsApp label was edited.
LabelAssociationChatA label was applied to or removed from a chat.
LabelAssociationMessageA label was applied to or removed from a message.
ClientOutdatedWhatsApp says this client version is outdated.
TemporaryBanAccount received a temporary ban event.
TemporaryBanReasonReason details for a temporary ban.
JoinedGroupThe account joined or was added to a group.
BlocklistBlocked contacts changed.
PrivacySettingsPrivacy settings changed.
ClearChatA chat was cleared.
ContactContact state changed.
MarkChatAsReadA chat read/unread state changed.
UserAboutA user’s about text changed.

Receiver rules

Your webhook endpoint should:
  • Respond with 2xx quickly.
  • Parse jsonData after reading form data.
  • Store token, type, message IDs, and timestamps.
  • Deduplicate by event.Info.ID for messages or by type + message ID + timestamp for receipts.
  • Save uploaded file before returning.
  • Handle fields you do not recognize. WhatsApp event objects can gain new fields.
  • Avoid slow work inside the request. Queue follow-up jobs after storing the event.