POST
/
api
/
v1
/
campaign
/
whatsapp
/
message
/
send

You can send messages only if the user session is already active; otherwise, the messages will fail. We recommend sending a approved template message the first time you contact users. Once the session is open, you can send unlimited messages via these APIs. For more info click here

Body

to
string
required

Specifies the recipient’s phone number in international format (e.g., “1xxxxxxxxxx”).

phoneId
string
required

This is the unique identifier associated with the sender’s phone number given by WhatsApp. Find the Phone ID on the Zixflow WhatsApp Settings page next to the number. Whatsapp Settings

type
string
default: "text"required

To send text messages keep message type as “text”

text
object
required

A Text Object consists of the following fields and formatting options:

preview_url
boolean
required

Optional.

By default, WhatsApp recognizes URLs and makes them clickable, but you can also include a preview box with more information about the link. Set this field to true if you want to include a URL preview box.

The majority of the time when you send a URL, whether with a preview or not, the receiver of the message will see a URL that they can click on.

URL previews are only rendered after one of the following has occurred:

The business has sent a message template to the user.

The user initiates a conversation with a “click to chat” link.

The user adds the business phone number to their address book and initiates a conversation.

Default: false

body
string
required

Required for text messages.

The text of the text message that can contain URLs and supports formatting. To view available formatting options, see Text Object Formatting Options.

If you include URLs in your text and want to include a preview box in text messages (“preview_url”: true), ensure it starts with http:// or https://. You must include a hostname, since IP addresses are not matched.

Maximum length: 4096 characters.

source
string
default: "API"

If the “linkWithRecord” is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API.

Specify whether to associate the current message with a record and display it in the inbox. Set it to “true” for linking with a record; otherwise, it defaults to “false.”

reportURL
string

(Optional) Specify the URL where the user’s report and deliveries should be delivered.

submissionStatus
boolean

Indicates whether to wait for the submission status. Set it to “true” if you want to wait for the submission status; otherwise, it defaults to “false.”

Response

status
boolean

Indicates whether the call was successful. true if successful, false if not.

message
string

success or error response message