Skip to main content

Documentation Index

Fetch the complete documentation index at: https://whiskeysockets-docs-jids-socket-config-ptbr.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Baileys supports two related but distinct distribution mechanisms: broadcast lists, which let you send a message privately to multiple contacts at once, and WhatsApp Status (Stories), which publishes content visible to your contacts for 24 hours. Both use sock.sendMessage with a few additional options.

WhatsApp IDs for broadcasts

Before sending, make sure you have the correct JID format for your target:
TargetJID format
Broadcast list[timestamp of creation]@broadcast
Status (Stories)status@broadcast

Send a broadcast or Status update

Add the broadcast, statusJidList, and optionally backgroundColor and font fields to the options object of sock.sendMessage.
await sock.sendMessage(
    jid,
    {
        image: {
            url: url
        },
        caption: caption
    },
    {
        backgroundColor: backgroundColor,
        font: font,
        statusJidList: statusJidList,
        broadcast: true
    }
)
Key options explained:
OptionDescription
broadcastSet to true to enable broadcast mode
statusJidListArray of contact JIDs who will receive this Status update
backgroundColorBackground color for text status updates
fontFont style for text status updates
statusJidList is required when publishing to status@broadcast. It determines which of your contacts can see the story. You must build and maintain this list yourself.

Supported content types

The message body (the first argument after the JID) can be any of the following content types:
TypeExample use case
extendedTextMessageText-based status with background/font
imageMessagePhoto status
videoMessageVideo status
voiceMessageAudio status
See the AnyRegularMessageContent type alias for the full list of supported content shapes, and MiscMessageGenerationOptions for all available send options.

Send to a broadcast list

You can send messages to a broadcast list the same way you send to an individual chat or group — just use the broadcast list’s JID as the target.
// Send a text message to a broadcast list
await sock.sendMessage('1234567890123456789@broadcast', { text: 'Hello everyone!' })

Query a broadcast list’s name and recipients

const bList = await sock.getBroadcastListInfo('1234@broadcast')
console.log(`list name: ${bList.name}, recps: ${bList.recipients}`)

Limitations

WhatsApp Web does not support creating new broadcast lists. You can still send messages to existing broadcast lists and delete them, but you cannot create new ones through Baileys.
  • Broadcast lists must be created in the WhatsApp mobile app first.
  • Each broadcast list JID is derived from its creation timestamp, e.g. 1234567890123@broadcast.
  • Deleting a broadcast list through chatModify is supported, but creating one is not.