Skip to main content
Node.js

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-phone
string

Please provide the number of the phone you want to call with this API in the header. The number must be in country code + number format without any characters or spaces, e.g. 919876543210; Alternatively, provide the phone_id (phone-xxxxxxxxxxxx) in the header

Example:

"{{orgPhone}}"

Body

application/json
chat_id
string
required
  • For groups, enter the chat_id of the group. This will be a string that ends with @g.us
  • For 1-1 chats, enter the country_code + number of the recipient e.g. 919537851844@c.us (The @c.us is optional)
Example:

"919537851844@c.us"

message
string

The text body or caption. You can use basic markdown formatting supported by WhatsApp e.g. * for bold, and _ for italic, etc

media
object

Media object containing file information and content

Note: You must specify either filedata or url

reply_to
string

To reply to a message, add the WA message_id or private note message_id in this field

Response

200 - application/json

Text Note / Media Note / Reply Note

The response is a JSON object with the following properties: