Skip to main content

Messages

Send messages on every connected channel, and read a contact's conversation.

  • Send to an existing contact or client by id. On WhatsApp you can also send to a recepient phone number and name: the contact is created if needed.
  • Pass location to choose the workspace whose connected channel sends the message, and optionally scheduleDateTime to send later.
  • A successful request answers once the message is queued. Delivery status shows in the Team Inbox and in message webhooks.
  • A channel that is not connected in the location answers 400 with code CHANNEL_NOT_CONNECTED.
API regionapi.whautomate.com

Get a contact's messages​

GET /v1/messages/{contactId}

Lists the messages of a contact, newest first.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
contactIdstringrequired
Query parameters
limitinteger
Results per page (default 10, max 100).
pageinteger
Page number, from 1 (default 1).
searchTextstring
Text to search for.
Response 200
idstring
contactobject
channelstring
isIncomingboolean
typestring
sentBystring
statusstring
errorMessagestring
mediaUrlstring
textstring
footerTextstring
optionsobject
timestampstring
createdAtstring
When the record was created (ISO 8601, UTC).
updatedAtstring
When the record was last changed (ISO 8601, UTC).
Request
curl -X GET "https://api.whautomate.com/v1/messages/NSasDKs69e?limit=3" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"id": "9ATYAluzSF",
"contact": {
"id": "NSasDKs69e",
"channel": "whatsapp",
"phoneNumber": "6598812046"
},
"channel": "whatsapp",
"isIncoming": false,
"type": "template",
"sentBy": "Serene Wellness Studio Bot",
"timestamp": "2026-10-29T12:40:13.073Z",
"errorMessage": "",
"text": "See our timetable and book online in under a minute.",
"options": {
"type": "BUTTONS",
"buttons": [
{
"text": "Book now",
"url": "https://serene.example.com/book"
}
]
},
"createdAt": "2026-10-29T12:40:13.077Z",
"updatedAt": "2026-10-29T12:40:13.077Z"
},
{
"id": "oh3WdKmuYj",
"contact": {
"id": "NSasDKs69e",
"channel": "whatsapp",
"phoneNumber": "6598812046"
},
"channel": "whatsapp",
"isIncoming": false,
"type": "template",
"sentBy": "Serene Wellness Studio Bot",
"timestamp": "2026-10-29T12:40:12.953Z",
"errorMessage": "",
"text": "Which service would you like to book?",
"options": {
"type": "BUTTONS",
"buttons": [
{
"text": "View services"
}
]
},
"createdAt": "2026-10-29T12:40:12.960Z",
"updatedAt": "2026-10-29T12:40:12.960Z"
}
]

WhatsApp​

Text and media messages can only be sent inside the 24-hour customer service window (after the customer's last message). Template messages can be sent any time; get template ids from WhatsApp templates. Interactive messages (reply buttons, lists, a URL button, your catalog) also need an open window; replies arrive as incoming messages and can start automations.

Send a WhatsApp template message​

POST /v1/messages/whatsapp/sendtemplate

Sends an approved WhatsApp template, with its variables, header media and button parameters.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
templateobjectrequired
headerMediaUrlstring
headerTextParametersstring[]
bodyTextParametersstring[]
buttonUrlParametersstring[]
locationParametersobject
flowParametersobject
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendtemplate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"template": {
"name": "whauto_appointment_updated_practitioner",
"language": "en"
},
"bodyTextParameters": [
"Arjun",
"Deep Tissue Massage",
"2026-11-02 at 10:00 AM"
]
}'
Response 200
{
"success": true
}

Send a WhatsApp text message​

POST /v1/messages/whatsapp/sendtext

Sends a text message inside the 24-hour window.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request: To a contact
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Hi Arjun, thanks for your enquiry! Our corporate wellness packages start at S$1,200 a month for 20 staff."
}'
Response 200: To a contact
{
"success": true
}
Request: To a phone number
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recepient": {
"phoneNumber": "+6598812046",
"name": "Arjun Menon"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Your massage is confirmed for tomorrow at 10:00 AM."
}'
Response 200: To a phone number
{
"success": true
}

Send a WhatsApp media message​

POST /v1/messages/whatsapp/sendmedia

Sends an image, video, audio or document inside the 24-hour window.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
mimeTypestringrequired
mediaUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendmedia" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"mimeType": "image/png",
"mediaUrl": "https://cdn.example.com/media/studio-price-list.png"
}'
Response 200
{
"success": true
}

Send WhatsApp reply buttons​

POST /v1/messages/whatsapp/sendinteractivebuttons

Sends a message with up to 3 reply buttons.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
headerTypestring (enum)
One of: TEXT, IMAGE, DOCUMENT, VIDEO.
headerTextMessagestring
mimeTypestring
mediaUrlstring
buttonsstring[]required
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendinteractivebuttons" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Would you like to book a trial session for your team?",
"headerType": "TEXT",
"headerTextMessage": "Corporate wellness",
"buttons": [
"Yes, book a trial",
"Send me the brochure",
"Not now"
]
}'
Response 200
{
"success": true
}

Send a WhatsApp list​

POST /v1/messages/whatsapp/sendinteractivelist

Sends a message with a list of up to 10 options.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
headerTypestring (enum)
One of: TEXT.
headerTextMessagestring
listButtonTitlestringrequired
listSectionTitlestring
buttonsobject[]required
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendinteractivelist" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Which service would you like to book?",
"headerType": "TEXT",
"headerTextMessage": "Our services",
"listButtonTitle": "View services",
"listSectionTitle": "Treatments",
"buttons": [
{
"id": "deep-tissue",
"title": "Deep Tissue Massage"
},
{
"id": "aromatherapy",
"title": "Aromatherapy Massage"
},
{
"id": "physio",
"title": "Physiotherapy"
}
]
}'
Response 200
{
"success": true
}

Send a WhatsApp URL button​

POST /v1/messages/whatsapp/sendinteractivectaurl

Sends a message with a button that opens a URL.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
headerTypestring (enum)
One of: TEXT, IMAGE, DOCUMENT, VIDEO.
headerTextMessagestring
mimeTypestring
mediaUrlstring
buttonTitlestringrequired
buttonUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendinteractivectaurl" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "See our timetable and book online in under a minute.",
"headerType": "TEXT",
"headerTextMessage": "Book online",
"buttonTitle": "Book now",
"buttonUrl": "https://serene.example.com/book"
}'
Response 200
{
"success": true
}

Send your WhatsApp catalog​

POST /v1/messages/whatsapp/sendcatalog

Sends a message that opens your WhatsApp catalog.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/whatsapp/sendcatalog" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "NSasDKs69e"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Browse our studio shop: oils, mats and gift sets."
}'
Response 200
{
"success": true
}

Telegram​

Send to clients and contacts who chat with your connected Telegram bot.

Send a Telegram text message​

POST /v1/messages/telegram/sendtext

Sends a Telegram text message.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/telegram/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}
Response 400: Channel not connected
{
"error": "Telegram is not connected for this location. Connect a bot in Integrations > Telegram.",
"code": "CHANNEL_NOT_CONNECTED"
}

Send a Telegram media message​

POST /v1/messages/telegram/sendmedia

Sends a Telegram image, video, audio or document.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
mimeTypestringrequired
mediaUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/telegram/sendmedia" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "string"
},
"scheduleDateTime": "string",
"mimeType": "string",
"mediaUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}
Response 400: Channel not connected
{
"error": "Telegram is not connected for this location. Connect a bot in Integrations > Telegram.",
"code": "CHANNEL_NOT_CONNECTED"
}

Send a Telegram template message​

POST /v1/messages/telegram/sendtemplate

Sends a Telegram message with buttons.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
locationobjectrequired
headerTypestring (enum)
One of: IMAGE, VIDEO, DOCUMENT.
mimeTypestring
mediaUrlstring
textMessagestringrequired
buttonsobject[]required
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/telegram/sendtemplate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "string"
},
"location": {
"id": "string"
},
"headerType": "IMAGE",
"mimeType": "string",
"mediaUrl": "string",
"textMessage": "string",
"buttons": [
{
"type": "web_url",
"title": "string",
"payload": "string",
"url": "string"
}
]
}'
Response 200
{
"success": true
}
Response 400: Channel not connected
{
"error": "Telegram is not connected for this location. Connect a bot in Integrations > Telegram.",
"code": "CHANNEL_NOT_CONNECTED"
}

Instagram​

Instagram lets businesses reply within 24 hours of the customer's last message.

Send an Instagram text message​

POST /v1/messages/instagram/sendtext

Sends an Instagram text message.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/instagram/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "CpdL8tmK4T"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Hi Chloe! Yes, we have mat Pilates on Tuesday and Thursday evenings."
}'
Response 200
{
"success": true
}

Send an Instagram media message​

POST /v1/messages/instagram/sendmedia

Sends an Instagram image, video or audio.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
mimeTypestringrequired
mediaUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/instagram/sendmedia" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "CpdL8tmK4T"
},
"location": {
"id": "Le6dWjQF9K"
},
"mimeType": "image/png",
"mediaUrl": "https://cdn.example.com/media/pilates-timetable.png"
}'
Response 200
{
"success": true
}

Send an Instagram template message​

POST /v1/messages/instagram/sendtemplate

Sends an Instagram message with buttons.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
locationobjectrequired
elementsobject[]required
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/instagram/sendtemplate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "CpdL8tmK4T"
},
"location": {
"id": "Le6dWjQF9K"
},
"elements": [
{
"title": "Pilates Core",
"subtitle": "45 minutes, S$35 a class",
"image_url": "https://cdn.example.com/media/pilates-core.png",
"default_action": {
"type": "web_url",
"url": "https://serene.example.com/classes/pilates-core"
},
"buttons": [
{
"type": "web_url",
"title": "Book a class",
"url": "https://serene.example.com/classes/pilates-core"
},
{
"type": "postback",
"title": "Ask a question",
"payload": "ASK_PILATES"
}
]
}
]
}'
Response 200
{
"success": true
}

Messenger​

Messenger lets businesses reply within 24 hours of the customer's last message.

Send a Messenger text message​

POST /v1/messages/messenger/sendtext

Sends a Messenger text message.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/messenger/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "7TT2vpuvTA"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Hi Ryan, we are open until 9 PM tonight."
}'
Response 200
{
"success": true
}

Send a Messenger media message​

POST /v1/messages/messenger/sendmedia

Sends a Messenger image, video, audio or file.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
mimeTypestringrequired
mediaUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/messenger/sendmedia" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "7TT2vpuvTA"
},
"location": {
"id": "Le6dWjQF9K"
},
"mimeType": "image/png",
"mediaUrl": "https://cdn.example.com/media/studio-map.png"
}'
Response 200
{
"success": true
}

Send a Messenger template message​

POST /v1/messages/messenger/sendtemplate

Sends a Messenger message with buttons.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
locationobjectrequired
elementsobject[]required
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/messenger/sendtemplate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "7TT2vpuvTA"
},
"location": {
"id": "Le6dWjQF9K"
},
"elements": [
{
"title": "Sports Recovery Session",
"subtitle": "30 minutes of stretching and massage",
"image_url": "https://cdn.example.com/media/sports-recovery.png",
"default_action": {
"type": "web_url",
"url": "https://serene.example.com/services/sports-recovery"
},
"buttons": [
{
"type": "web_url",
"title": "Book now",
"url": "https://serene.example.com/services/sports-recovery"
},
{
"type": "phone_number",
"title": "Call us",
"payload": "+6562201234"
}
]
}
]
}'
Response 200
{
"success": true
}

TikTok​

Send to contacts who messaged your connected TikTok Business account, by contact id or tikTokUserId. TikTok lets businesses reply only within the window TikTok allows after the customer's last message.

Send a TikTok text message​

POST /v1/messages/tiktok/sendtext

Sends a TikTok text message

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/tiktok/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "YzkJMtPtpM"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Thanks for the comment, Zoe! Our recovery sessions run every day."
}'
Response 200
{
"success": true
}

Send a TikTok media message​

POST /v1/messages/tiktok/sendmedia

Sends a TikTok media message

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobject
recepientobject
scheduleDateTimestring
mimeTypestringrequired
mediaUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/tiktok/sendmedia" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "YzkJMtPtpM"
},
"location": {
"id": "Le6dWjQF9K"
},
"mimeType": "image/png",
"mediaUrl": "https://cdn.example.com/media/recovery-offer.png"
}'
Response 200
{
"success": true
}

Send a TikTok Q&A button card​

POST /v1/messages/tiktok/sendqabuttoncard

Sends a TikTok Q&A button card

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
buttonsstring[]required
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/tiktok/sendqabuttoncard" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "YzkJMtPtpM"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "What would you like to know?",
"buttons": [
"Prices",
"Opening hours",
"Location"
]
}'
Response 200
{
"success": true
}

Send a TikTok Q&A text link card​

POST /v1/messages/tiktok/sendqatextlinkcard

Sends a TikTok Q&A text link card

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobject
recepientobject
scheduleDateTimestring
textMessagestringrequired
buttonsstring[]required
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/tiktok/sendqatextlinkcard" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "YzkJMtPtpM"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Popular questions",
"buttons": [
"How do I book?",
"Do you have parking?"
]
}'
Response 200
{
"success": true
}

SMS​

SMS goes out through the location's own SMS provider (Twilio, Vonage or Telnyx). A location with no active provider cannot send SMS (400, CHANNEL_NOT_CONNECTED).

Send an SMS​

POST /v1/messages/sms/sendtext

Sends a text message by SMS to a client or contact.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobject
clientobject
recepientobject
scheduleDateTimestring
ISO 8601; left out sends now.
textMessagestringrequired
Plain text; merge tags are filled for a contact or client.
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/sms/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "string"
},
"client": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}
Response 400: Channel not connected
{
"error": "SMS is not set up for this location. Connect an SMS provider in Integrations > SMS.",
"code": "CHANNEL_NOT_CONNECTED"
}

Live chat (website)​

Send to visitors who chat with you through your live chat widget, by their contact id.

Send a live chat text message​

POST /v1/messages/website/sendtext

Sends a Website live chat text message

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
textMessagestringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/website/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "3s9XExYM5t"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Hello! How can we help you today?"
}'
Response 200
{
"success": true
}

Send a live chat media message​

POST /v1/messages/website/sendmedia

Sends a Website live chat media message

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
mimeTypestringrequired
mediaUrlstringrequired
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/website/sendmedia" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "3s9XExYM5t"
},
"location": {
"id": "Le6dWjQF9K"
},
"mimeType": "image/png",
"mediaUrl": "https://cdn.example.com/media/gift-vouchers.png"
}'
Response 200
{
"success": true
}

Send a live chat template message​

POST /v1/messages/website/sendtemplate

Sends a Website live chat template message with buttons

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
contactobjectrequired
scheduleDateTimestring
textMessagestringrequired
headerTypestring (enum)
One of: TEXT, IMAGE, DOCUMENT, VIDEO.
headerTextMessagestring
mimeTypestring
mediaUrlstring
buttonsobject[]required
locationobjectrequired
Response 200
successboolean
Request
curl -X POST "https://api.whautomate.com/v1/messages/website/sendtemplate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact": {
"id": "3s9XExYM5t"
},
"location": {
"id": "Le6dWjQF9K"
},
"textMessage": "Gift a massage this Christmas.",
"headerType": "TEXT",
"headerTextMessage": "Gift vouchers",
"buttons": [
{
"type": "web_url",
"title": "Buy a voucher",
"url": "https://serene.example.com/vouchers"
},
{
"type": "postback",
"title": "Talk to us",
"payload": "TALK"
}
]
}'
Response 200
{
"success": true
}