Skip to main content
POST

Identifying the recipient

The userId field accepts two formats:
  • Phone number: E.164 format without the leading + (e.g.: 593999999999).
  • BSUID (Business-Scoped User ID): an identifier with the format CC.alphanumeric (e.g.: US.13491208655302741918).
What is a BSUID? When a user enables number privacy in WhatsApp, Meta stops exposing their real phone number and instead identifies the user through a BSUID unique to your business. If your integration already knows a user’s BSUID —for example, because you received it in an incoming webhook—, you can use it directly in userId to send them a message without needing their phone number.
cURL
Invalid format: if userId doesn’t match a valid phone number or a properly formatted BSUID, the API responds with a 400 error (INVALID_USER_ID).

Use Cases

  • Simple notifications
  • Confirmations
  • Informational messages
  • Basic automated responses
  • Replying to a user who enabled number privacy in WhatsApp, using the BSUID received in an incoming webhook
  • Sending proactive messages to users identified exclusively by BSUID, without needing to store or know their real phone number

Examples

Replying to an incoming message identified by BSUID

When a user with number privacy enabled writes to you, the incoming webhook carries their BSUID instead of a phone number. Use that same value to reply:
cURL

Sending an image to a recipient identified by BSUID

Every other message type (image, document, location, etc.) works the same way: just swap the userId value for the recipient’s BSUID.
cURL

Authorizations

Authorization
string
header
required

Basic authentication using Base64 encoded clientId:clientSecret

Path Parameters

botId
string
required

The unique identifier of the bot

Body

application/json

Message payload. The structure varies based on the message type.

type
enum<string>
required

Type of message to send

Available options:
text
Example:

"text"

userId
string
required

Unique identifier of the user receiving the message. Accepts either a phone number in E.164 format without the leading '+' (e.g. '593999999999') or a BSUID (Business-Scoped User ID, e.g. 'US.13491208655302741918') for users who have enabled phone number privacy in WhatsApp.

Example:

"593999999999"

text
string
required

Text content of the message

Example:

"Hello, this is a text message"

botId
string

Unique identifier of the bot sending the message

Example:

"BOT_ID"

Response

Message sent successfully

success
boolean
Example:

true

messageId
string
Example:

"msg_123456789"