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>",
  "interactive": {
    "type": "<string>",
    "header": {},
    "body": {
      "text": "<string>"
    },
    "footer": {
      "text": "<string>"
    },
    "action": {}
  },
  "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: "interactive"required

To send list interactive messages keep message type as “interactive”

interactive
object
required

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

type
string
default: "button"required

To send replay bytton interactive messages keep message type as “button”

header
object

Optional.

This contains the header content displayed on top of a message.

The header object contains the following fields:

  1. document: Required if type is set to document. Contains the media object with the document.
  2. image: Required if type is set to image. Contains the media object with the image.
  3. video: Required if type is set to video. Contains the media object with the video.
  4. text: Required if type is set to text. The text for the header. Formatting allows emojis, but not markdown. Maximum length: 60 characters.

Supported interactive message type by header type:

  1. text - for List Messages, Reply Buttons, and Multi-Product Messages
  2. video - for Reply Buttons.
  3. image: for Reply Buttons.
  4. document - For Reply Buttons.
body
object
required

Required.

The body of the message. The text field for the body object supports Emojis and markdown.

Maximum length: 1024 characters.

text
string
required

Required.

The body content of the message. Emojis and markdown are supported. Links are supported.

Maximum length: 1024 characters.

footer
object

Optional.

An object with the footer of the message.Emojis and markdown are supported.

Maximum length: 60 characters.

text
string
required

Required if the footer object is present.

The footer content of the message. Emojis and markdown are supported. Links are supported.

Maximum length: 60 characters.

action
array_object
required

The action you want the user to perform after reading the message.

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