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>",
  "location": {
    "latitude": "<string>",
    "longitude": "<string>",
    "name": "<string>",
    "address": "<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: "location"required

To send location messages keep message type as “location”

location
object
required

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

latitude
string
required

Required.

The longitude of the location.

longitude
string
required

Required.

The latitude of the location.

name
string

Optional.

The name of the location.

address
string

Optional.

The address of the location. This field is only displayed if name is present.

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"
}