Messages Object

  • To send a message, you must first assemble a message object with the content you want to send.

The Message Object contains the following fields used to create a message object:

Name Description
messaging_product Required.
Messaging service used for the request. Always use "whatsapp".
recipient_type Optional.
Currently, you can only send messages to individuals. Set this value to "individual".
Default: individual
To Required
WhatsApp ID or phone number for the person you want to send a message to.
context Optional.
Only used for Cloud API. Used to mention a specific message you are replying to. The reply can be any message type currently supported by the Cloud API.
type Optional.
The type of message you want to send.

The supported options for beta users are:

- text: for text messages.
- template: for template messages. Only text-based templates are supported.
- document: for document messages.
- image: for image messages.
- interactive: for list and reply button messages.
- audio: for audio messages.
- contacts: for contacts messages.
- location: for location messages.
- sticker: for sticker messages.
- video: for video messages.

Default: text
text Required When Type is set to 'text'
text Required When Type is set to 'text'
audio Required When Type is set to 'audio'
contact Required When Type is set to 'contact'
document Required When Type is set to 'document'
document Required When Type is set to 'document'
image Required When Type is set to 'image'
interactive Required When Type is set to 'interactive'.
This option is used to send List Messages and Reply Buttons.

header, body, footer, and action .
location Required When Type is set to 'location'
reaction Required When Type is set to 'reaction'
sticker Required When Type is set to 'sticker'
video Required When Type is set to 'video'
template Required When Type is set to 'template'