Skip to main content
Baileys supports sending messages to both broadcast lists and WhatsApp status updates (stories). This guide covers how to work with these special message types.

Sending to broadcast lists

Broadcast lists allow you to send messages to multiple recipients who will receive them as individual chats. Each recipient sees the message as if it was sent directly to them.

Broadcast JID format

Broadcast list identifiers follow the format 12345678@broadcast, where the numeric prefix is the broadcast list ID.
const broadcastJid = '12345678@broadcast'

Sending messages to broadcasts

To send a message to a broadcast list, use the broadcast: true option:
await sock.sendMessage(
  '12345678@broadcast',
  {
    text: 'Hello everyone!'
  },
  {
    broadcast: true
  }
)
You can send messages to broadcast lists the same way you send messages to groups and individual chats. The main difference is setting the broadcast: true option.

Query broadcast list information

Retrieve a broadcast list’s name and recipients:
const bList = await sock.getBroadcastListInfo('1234@broadcast')
console.log(`List name: ${bList.name}`)
console.log(`Recipients: ${bList.recipients}`)

Sending status updates (stories)

Status updates (also known as stories) are temporary messages that appear in your contacts’ Status tab and disappear after 24 hours.

Status JID

Status updates are sent to the special JID status@broadcast:
const statusJid = 'status@broadcast'

Basic status message

Send a text status update:
await sock.sendMessage(
  'status@broadcast',
  {
    text: 'Hello from my status!'
  },
  {
    statusJidList: statusJidList,
    broadcast: true
  }
)

Status with media

Send an image or video as a status update:
await sock.sendMessage(
  'status@broadcast',
  {
    image: {
      url: 'https://example.com/image.jpg'
    },
    caption: 'Check out this image!'
  },
  {
    backgroundColor: '#FF5733',
    font: 2,
    statusJidList: statusJidList,
    broadcast: true
  }
)

Status message options

When sending status updates, you can customize the appearance and delivery:

Required options

An array of JIDs (phone numbers) of contacts who should receive this status update. Only users in this list will see your status.
const statusJidList = [
  '[email protected]',
  '[email protected]'
]
Must be set to true to enable broadcast mode for status messages.
{ broadcast: true }

Optional styling options

Set a background color for text status updates. Use hex color codes.
{ backgroundColor: '#FF5733' }
Choose a font style for text status updates. Different numeric values represent different fonts.
{ font: 2 }

Supported message types

You can send various message types as status updates:
  • Text messages - extendedTextMessage
  • Images - imageMessage
  • Videos - videoMessage
  • Voice messages - voiceMessage
For a complete list of message content types and their options, see the MiscMessageGenerationOptions and AnyRegularMessageContent type references.

Complete example

Here’s a complete example combining all the concepts:
import makeWASocket from '@whiskeysockets/baileys'

const sock = makeWASocket({ /* config */ })

// Get your contacts for status updates
const statusJidList = [
  '[email protected]',
  '[email protected]'
]

// Send a text status
await sock.sendMessage(
  'status@broadcast',
  { text: 'Having a great day!' },
  {
    backgroundColor: '#4CAF50',
    font: 1,
    statusJidList: statusJidList,
    broadcast: true
  }
)

// Send an image status
await sock.sendMessage(
  'status@broadcast',
  {
    image: { url: './photo.jpg' },
    caption: 'Beautiful sunset'
  },
  {
    statusJidList: statusJidList,
    broadcast: true
  }
)

// Send to a broadcast list
const broadcastInfo = await sock.getBroadcastListInfo('12345@broadcast')
if (broadcastInfo) {
  await sock.sendMessage(
    '12345@broadcast',
    { text: 'Announcement for everyone!' },
    { broadcast: true }
  )
}

Limitations

WhatsApp Web does not currently support creating new broadcast lists. You can only send messages to existing broadcast lists and delete them.
Status updates are only visible to contacts who have your phone number saved and whom you have in your contact list.

Build docs developers (and LLMs) love