All outgoing content goes through a single method:Documentation Index
Fetch the complete documentation index at: https://zapo.to/llms.txt
Use this file to discover all available pages before exploring further.
to— the recipient (5511999999999@s.whatsapp.net, a group...@g.us, etc.). See JID helpers for building these.content— a string, a typed content object, or a rawProto.IMessage.options— quoting, mentions, forwarding, view-once, edits, and more.
WaMessagePublishResult once the server acks:
Plain text
The simplest content is a string:Replying (quoting)
Pass the original message event (or a reference) asoptions.quote:
Mentions
options.mentions is a list of JIDs to tag. Include the matching @number text in the body so WhatsApp renders the mention:
Link previews
Link-preview behavior is controlled per message via the text object’slinkPreview field:
| Value | Behavior |
|---|---|
undefined | Follow the global linkPreview default. |
false | Disable the preview. |
true | Force auto-fetch of the preview. |
| object | Skip the fetch and use the provided preview fields directly. |
linkPreview client option.
Forwarding
Setoptions.forward to mark a message as forwarded:
Send options reference
WaSendMessageOptions (third argument) includes:
| Option | Type | Purpose |
|---|---|---|
quote | WaIncomingMessageEvent | WaQuoteRef | Reply to a message. |
mentions | string[] | JIDs to mention. |
forward | boolean | { score } | Mark as forwarded. |
viewOnce | boolean | Wrap image/video/audio as view-once. |
editKey | WaSendEditKey | Edit a previously sent message (see interactive). |
contextInfo | WaSendContextInfo | Raw context info (advanced). |
id | string | Use a specific message id. |
ackTimeoutMs / maxAttempts / retryDelayMs | number | Per-send retry tuning. |
The content union
content accepts any WaSendMessageContent. The typed variants are documented across these guides:
Media
Images, video, audio, documents, stickers.
Polls & reactions
Polls, votes, reactions, pins, edits, revokes, events.
Proto.IMessage for anything not covered by a typed builder:
