Messages
Send messages on every connected channel, and read a contact's conversation.
- Send to an existing
contactorclientby id. On WhatsApp you can also send to arecepientphone number and name: the contact is created if needed. - Pass
locationto choose the workspace whose connected channel sends the message, and optionallyscheduleDateTimeto 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
400withcodeCHANNEL_NOT_CONNECTED.
api.whautomate.comGet a contact's messages
/v1/messages/{contactId}Lists the messages of a contact, newest first.
x-api-keystringrequiredcontactIdstringrequiredlimitintegerpageintegersearchTextstringidstringcontactobjectchannelstringisIncomingbooleantypestringsentBystringstatusstringerrorMessagestringmediaUrlstringtextstringfooterTextstringoptionsobjecttimestampstringcreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/messages/NSasDKs69e?limit=3" \
-H "x-api-key: YOUR_API_KEY"
[
{
"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
/v1/messages/whatsapp/sendtemplateSends an approved WhatsApp template, with its variables, header media and button parameters.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringtemplateobjectrequiredheaderMediaUrlstringheaderTextParametersstring[]bodyTextParametersstring[]buttonUrlParametersstring[]locationParametersobjectflowParametersobjectlocationobjectrequiredsuccessbooleancurl -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"
]
}'
{
"success": true
}
Send a WhatsApp text message
/v1/messages/whatsapp/sendtextSends a text message inside the 24-hour window.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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."
}'
{
"success": true
}
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."
}'
{
"success": true
}
Send a WhatsApp media message
/v1/messages/whatsapp/sendmediaSends an image, video, audio or document inside the 24-hour window.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringmimeTypestringrequiredmediaUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}'
{
"success": true
}
Send WhatsApp reply buttons
/v1/messages/whatsapp/sendinteractivebuttonsSends a message with up to 3 reply buttons.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredheaderTypestring (enum)TEXT, IMAGE, DOCUMENT, VIDEO.headerTextMessagestringmimeTypestringmediaUrlstringbuttonsstring[]requiredlocationobjectrequiredsuccessbooleancurl -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"
]
}'
{
"success": true
}
Send a WhatsApp list
/v1/messages/whatsapp/sendinteractivelistSends a message with a list of up to 10 options.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredheaderTypestring (enum)TEXT.headerTextMessagestringlistButtonTitlestringrequiredlistSectionTitlestringbuttonsobject[]requiredlocationobjectrequiredsuccessbooleancurl -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"
}
]
}'
{
"success": true
}
Send a WhatsApp URL button
/v1/messages/whatsapp/sendinteractivectaurlSends a message with a button that opens a URL.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredheaderTypestring (enum)TEXT, IMAGE, DOCUMENT, VIDEO.headerTextMessagestringmimeTypestringmediaUrlstringbuttonTitlestringrequiredbuttonUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}'
{
"success": true
}
Send your WhatsApp catalog
/v1/messages/whatsapp/sendcatalogSends a message that opens your WhatsApp catalog.
x-api-keystringrequiredclientobjectcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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."
}'
{
"success": true
}
Telegram
Send to clients and contacts who chat with your connected Telegram bot.
Send a Telegram text message
/v1/messages/telegram/sendtextSends a Telegram text message.
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}
}'
{
"success": true
}
{
"error": "Telegram is not connected for this location. Connect a bot in Integrations > Telegram.",
"code": "CHANNEL_NOT_CONNECTED"
}
Send a Telegram media message
/v1/messages/telegram/sendmediaSends a Telegram image, video, audio or document.
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringmimeTypestringrequiredmediaUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}
}'
{
"success": true
}
{
"error": "Telegram is not connected for this location. Connect a bot in Integrations > Telegram.",
"code": "CHANNEL_NOT_CONNECTED"
}
Send a Telegram template message
/v1/messages/telegram/sendtemplateSends a Telegram message with buttons.
x-api-keystringrequiredcontactobjectrequiredlocationobjectrequiredheaderTypestring (enum)IMAGE, VIDEO, DOCUMENT.mimeTypestringmediaUrlstringtextMessagestringrequiredbuttonsobject[]requiredsuccessbooleancurl -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"
}
]
}'
{
"success": true
}
{
"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
/v1/messages/instagram/sendtextSends an Instagram text message.
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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."
}'
{
"success": true
}
Send an Instagram media message
/v1/messages/instagram/sendmediaSends an Instagram image, video or audio.
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringmimeTypestringrequiredmediaUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}'
{
"success": true
}
Send an Instagram template message
/v1/messages/instagram/sendtemplateSends an Instagram message with buttons.
x-api-keystringrequiredcontactobjectrequiredlocationobjectrequiredelementsobject[]requiredsuccessbooleancurl -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"
}
]
}
]
}'
{
"success": true
}
Messenger
Messenger lets businesses reply within 24 hours of the customer's last message.
Send a Messenger text message
/v1/messages/messenger/sendtextSends a Messenger text message.
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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."
}'
{
"success": true
}
Send a Messenger media message
/v1/messages/messenger/sendmediaSends a Messenger image, video, audio or file.
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringmimeTypestringrequiredmediaUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}'
{
"success": true
}
Send a Messenger template message
/v1/messages/messenger/sendtemplateSends a Messenger message with buttons.
x-api-keystringrequiredcontactobjectrequiredlocationobjectrequiredelementsobject[]requiredsuccessbooleancurl -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"
}
]
}
]
}'
{
"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
/v1/messages/tiktok/sendtextSends a TikTok text message
x-api-keystringrequiredcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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."
}'
{
"success": true
}
Send a TikTok media message
/v1/messages/tiktok/sendmediaSends a TikTok media message
x-api-keystringrequiredcontactobjectrecepientobjectscheduleDateTimestringmimeTypestringrequiredmediaUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}'
{
"success": true
}
Send a TikTok Q&A button card
/v1/messages/tiktok/sendqabuttoncardSends a TikTok Q&A button card
x-api-keystringrequiredcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredbuttonsstring[]requiredlocationobjectrequiredsuccessbooleancurl -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"
]
}'
{
"success": true
}
Send a TikTok Q&A text link card
/v1/messages/tiktok/sendqatextlinkcardSends a TikTok Q&A text link card
x-api-keystringrequiredcontactobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredbuttonsstring[]requiredlocationobjectrequiredsuccessbooleancurl -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?"
]
}'
{
"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
/v1/messages/sms/sendtextSends a text message by SMS to a client or contact.
x-api-keystringrequiredcontactobjectclientobjectrecepientobjectscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}
}'
{
"success": true
}
{
"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
/v1/messages/website/sendtextSends a Website live chat text message
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringtextMessagestringrequiredlocationobjectrequiredsuccessbooleancurl -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?"
}'
{
"success": true
}
Send a live chat media message
/v1/messages/website/sendmediaSends a Website live chat media message
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringmimeTypestringrequiredmediaUrlstringrequiredlocationobjectrequiredsuccessbooleancurl -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"
}'
{
"success": true
}
Send a live chat template message
/v1/messages/website/sendtemplateSends a Website live chat template message with buttons
x-api-keystringrequiredcontactobjectrequiredscheduleDateTimestringtextMessagestringrequiredheaderTypestring (enum)TEXT, IMAGE, DOCUMENT, VIDEO.headerTextMessagestringmimeTypestringmediaUrlstringbuttonsobject[]requiredlocationobjectrequiredsuccessbooleancurl -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"
}
]
}'
{
"success": true
}