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. Same story for disableDirectEphemeralAutoInject in 1:1 chats.

Sending to a username

A username handle (@alice) is not an addressable JID on its own. Resolve it to the account’s LID with client.profile.resolveUsername first, then send to that JID — the send API takes the JID exactly like any other 1:1 recipient. resolveUsername returns a discriminated union you have to switch on. Every case has a next step:
resolveUsername throws before any round-trip when the handle or the key fails local validation (bad characters, wrong length, reserved word, key that is not exactly 4 digits) — so a call that returns has passed local rules and the status reflects the server-side outcome.

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:
Content types without a typed builder yet — locations, contact vCards, and Business PIX / review-and-pay payment cards — are documented in Raw proto sends. 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 August 19, 2026