Send Message
curl --request POST \
--url https://chat.zoko.io/v2/message \
--header 'Content-Type: application/json' \
--header 'apikey: <apikey>' \
--data '{
"assign": {
"assigneeId": "<string>",
"override": true
},
"caption": "<string>",
"channel": "whatsapp",
"contacts": {
"whatsappContacts": []
},
"message": "<string>",
"recipient": "919998880000",
"templateArgs": "arg1",
"templateId": "greeting",
"templateLanguage": "en",
"type": "template"
}'
{
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "202",
"statusText": "Accepted"
}
Authorizations
Authentication is done via apikey
provided for your account
Include the following in your request header
apikey: "your_apikey_here"
Body
If the customer (recipient) needs to be assigned to an agent
Describes the specified image
, video
or document
media. Do not use with audio
media.
whatsapp
Contacts array for message type contacts
Content of the message.
type text
- contains text content of the message
type image
,document
, audio
, video
, sticker
- contains the file URL
type location
- contains latitude and longitude in the format <latitude>:<longitude>
type template
, richTemplate
, buttonTemplate
, contacts
- field is NOT used
For channel whatsapp -> E.164 format without leading +
Template placeholder values in the same order as in the template.
mandatory for message type template
, richTemplate
and buttonTemplate
Template ID
mandatory for message type template
, richTemplate
and buttonTemplate
Template Language
Language is defaulted to en
(English), if not provided
mandatory for message type template
, richTemplate
and buttonTemplate
only if the template is not in default language en
text
, image
, document
, audio
, video
, location
, sticker
, contacts
, template
, richTemplate
, buttonTemplate
Response
curl --request POST \
--url https://chat.zoko.io/v2/message \
--header 'Content-Type: application/json' \
--header 'apikey: <apikey>' \
--data '{
"assign": {
"assigneeId": "<string>",
"override": true
},
"caption": "<string>",
"channel": "whatsapp",
"contacts": {
"whatsappContacts": []
},
"message": "<string>",
"recipient": "919998880000",
"templateArgs": "arg1",
"templateId": "greeting",
"templateLanguage": "en",
"type": "template"
}'
{
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "202",
"statusText": "Accepted"
}