Skip to main content
All outgoing content goes through a single method:
  • 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 raw Proto.IMessage.
  • options — quoting, mentions, forwarding, view-once, edits, and more.
The promise resolves to a WaMessagePublishResult once the server acks:

Plain text

The simplest content is a string:
For more control, use the text object form — it lets you attach context info and tune link previews:

Replying (quoting)

Pass the original message event (or a reference) as options.quote:
The quote is rendered as a reply bubble referencing the original message.

Mentions

options.mentions is a list of JIDs to tag. Include the matching @number text in the body so WhatsApp renders the mention:
Link-preview behavior is controlled per message via the text object’s linkPreview field:
Configure the default fetcher globally with the linkPreview client option.

Forwarding

Set options.forward to mark a message as forwarded:

Send options reference

WaSendMessageOptions (third argument) includes:
To send a single message with no expiration into a group with disappearing-mode on, prefer disableGroupEphemeralAutoInject: true over expirationSeconds: 0 — the latter still writes expiration=0 into the outgoing contextInfo.

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.
You can always drop down to a raw Proto.IMessage for anything not covered by a typed builder:

Location and contact

Message types without a typed builder are sent as raw Proto.IMessage fields — for example location and contact:
The full set of recognized Proto.IMessage fields (location, live location, contacts, group invite, product, order, …) is listed in the message types reference.
Last modified on May 29, 2026