Sending a Normal Message

Post Data AttributePost Data Attribute Value TypeDescriptionRequired
channel_idStringChannel ID by which the message template would be sent.Yes
contact_detailsJSONAll the values would be put into contact details when creating contacts
e.g.
{
city : "xxx",
country: "yyy",
tags : ["tag1", "tag2"]
}
No
phone_numberStringPhone number with country code
example
852967XXYYY (Country code 852 Stands for HongKong)
91897889XXXX (Country code 91 stands for India)
Yes
textStringFor text Message - Text content
For Media Message - Caption
No
file_urlStringFull Absolute URLNo
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"
}'