POST
/
api
/
v1
/
campaign
/
whatsapp
/
message
/
send
curl --request POST \
  --url https://api.zixflow.com/api/v1/campaign/whatsapp/message/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "to": "<string>",
  "phoneId": "<string>",
  "type": "<string>",
  "text": {
    "preview_url": true,
    "body": "<string>"
  },
  "source": "<string>",
  "linkWithRecord": true,
  "submissionStatus": true
}'
{
  "status": true,
  "message": "Message sent successfully"
}

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.

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.

linkWithRecord
boolean

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.”

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

{
  "status": true,
  "message": "Message sent successfully"
}