Sending a Normal Message
Post Data Attribute | Post Data Attribute Value Type | Description | Required |
channel_id | String | Channel ID by which the message template would be sent. | Yes |
contact_details | JSON | All the values would be put into contact details when creating contacts e.g. { city : "xxx", country: "yyy", tags : ["tag1", "tag2"] } | No |
phone_number | String | Phone number with country code example 852967XXYYY (Country code 852 Stands for HongKong) 91897889XXXX (Country code 91 stands for India) | Yes |
text | String | For text Message - Text content For Media Message - Caption | No |
file_url | String | Full Absolute URL | No |
curl --location --request POST '<baseAPIURl>/api/messages/send' \
--header 'X-API-Key: <API KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel_id": "<Channel ID>",
"phone_number": "<Phone Number with Country Code>",
"text": "Sample text"
}'
Sending a Image/Video with/without Caption
curl --location --request POST '<baseAPIURl>/api/messages/send' \
--header 'X-API-Key: <API KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel_id": "<Channel ID>",
"phone_number": "<Phone Number with Country Code>",
"text": "Sample Caption",
"file_url": "Full URL of file"
}'