Skip to main content

Messages

Send messages to your contacts and clients on every connected channel, and read a contact's conversation.

  • Send to an existing contact or client by id, or (WhatsApp) to a recepient phone number: the contact is created if needed.
  • Pass location to choose the workspace whose connected channel sends the message, and optionally scheduleDateTime to send later.
  • Outside the 24-hour customer service window, WhatsApp only allows approved templates.
  • A successful request returns {"success": true} once the message is queued; delivery status shows in the Team Inbox and in message webhooks.
API regionapi.whautomate.com

Get Messages of Contact​

GET /v1/messages/{contactId}
Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
contactIdstringrequired
Query parameters
limitstring
pagestring
searchTextstring
Response 200
idstring
contactobject
channelstring
isIncomingboolean
typestring
sentBystring
statusstring
errorMessagestring
mediaUrlstring
textstring
footerTextstring
optionsobject
Request
curl -X GET "https://api.whautomate.com/v1/messages/{contactId}" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"id": "string",
"contact": {
"id": "string",
"channel": "string",
"phoneNumber": "string"
},
"channel": "string",
"isIncoming": true,
"type": "string",
"sentBy": "string",
"status": "string",
"errorMessage": "string",
"mediaUrl": "string",
"text": "string",
"footerText": "string",
"options": {
"type": "string",
"buttons": [
{
"type": "string",
"text": "string",
"url": "string"
}
]
}
}
]

WhatsApp​

Please note you can only send Media and Text Messages when there is an active session (24 hr period). You can send template messages to a contact any time even if there is no active session.

You can send WhatsApp messages to

  • Contact
  • Client
  • Recepient

Simply send the message to a recepient with phoneNumber and name, the platform will create or use the existing contact in your account.

If you already have a contact or Client created in Whautomate and you have those identifiers, use those identifiers to send the message to them. If not use recepient instead.

POST /v1/messages/whatsapp/sendtemplate​

POST /v1/messages/whatsapp/sendtemplate
Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobject
contactobject
recepientobject
scheduleDateTimestring
templateobjectrequired
headerMediaUrlstring
headerTextParametersstring[]
bodyTextParametersstring[]
buttonUrlParametersstring[]
locationParametersobject
flowParametersobject
locationobjectrequired
Response 200
clientobject
contactobject
recepientobject
scheduleDateTimestring
templateobjectrequired
headerMediaUrlstring
headerTextParametersstring[]
bodyTextParametersstring[]
buttonUrlParametersstring[]
locationParametersobject
flowParametersobject
locationobjectrequired
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 '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"template": {
"name": "string",
"language": "string"
},
"headerMediaUrl": "string",
"headerTextParameters": [
"string"
],
"bodyTextParameters": [
"string"
],
"buttonUrlParameters": [
"string"
],
"locationParameters": {
"latitude": 0,
"longitude": 0,
"address": "string",
"name": "string"
},
"flowParameters": {
"flowToken": "string",
"flowData": "string"
},
"location": {
"id": "string"
}
}'
Response 200
{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"template": {
"name": "string",
"language": "string"
},
"headerMediaUrl": "string",
"headerTextParameters": [
"string"
],
"bodyTextParameters": [
"string"
],
"buttonUrlParameters": [
"string"
],
"locationParameters": {
"latitude": 0,
"longitude": 0,
"address": "string",
"name": "string"
},
"flowParameters": {
"flowToken": "string",
"flowData": "string"
},
"location": {
"id": "string"
}
}

POST /users

<Description of the endpoint>

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Body

NameTypeDescription
namestringName of the user
agenumberAge of the user

Response

{
"id": 1,
"name": "John",
"age": 30
}

POST /v1/messages/whatsapp/sendmedia​

POST /v1/messages/whatsapp/sendmedia
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 '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string"
},
"scheduleDateTime": "string",
"mimeType": "string",
"mediaUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

POST /v1/messages/whatsapp/sendtext​

POST /v1/messages/whatsapp/sendtext
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/sendtext" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

WhatsApp interactive messages​

Inside an open 24-hour conversation you can also send interactive messages: up to 3 reply buttons, a list of up to 10 options, a button that opens a URL, or your WhatsApp catalog. Replies to buttons and list options arrive as incoming messages and can trigger your automations.

Send WhatsApp Reply Buttons Message​

POST /v1/messages/whatsapp/sendinteractivebuttons
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 '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"headerType": "TEXT",
"headerTextMessage": "string",
"mimeType": "string",
"mediaUrl": "string",
"buttons": [
"string"
],
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send WhatsApp List Message​

POST /v1/messages/whatsapp/sendinteractivelist
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 '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"headerType": "TEXT",
"headerTextMessage": "string",
"listButtonTitle": "string",
"listSectionTitle": "string",
"buttons": [
{
"id": "string",
"title": "string",
"description": "string"
}
],
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send WhatsApp Call-to-Action URL Message​

POST /v1/messages/whatsapp/sendinteractivectaurl
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 '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"headerType": "TEXT",
"headerTextMessage": "string",
"mimeType": "string",
"mediaUrl": "string",
"buttonTitle": "string",
"buttonUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send WhatsApp Catalog Message​

POST /v1/messages/whatsapp/sendcatalog
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 '{
"client": {
"id": "string"
},
"contact": {
"id": "string"
},
"recepient": {
"phoneNumber": "string",
"name": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Telegram​

POST /v1/messages/telegram/sendmedia
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
}

POST /v1/messages/telegram/sendtext​

POST /v1/messages/telegram/sendtext
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
}

POST /v1/messages/telegram/sendtemplate​

POST /v1/messages/telegram/sendtemplate
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
}

Instagram​

POST /v1/messages/instagram/sendmedia
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": "string"
},
"scheduleDateTime": "string",
"mimeType": "string",
"mediaUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

POST /v1/messages/instagram/sendtemplate​

POST /v1/messages/instagram/sendtemplate
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": "string"
},
"location": {
"id": "string"
},
"elements": [
{
"title": "string",
"subtitle": "string",
"image_url": "string",
"default_action": {
"type": "string",
"url": "string"
},
"buttons": [
{
"type": "web_url",
"title": "string",
"payload": "string",
"url": "string"
}
]
}
]
}'
Response 200
{
"success": true
}

POST /v1/messages/instagram/sendtext​

POST /v1/messages/instagram/sendtext
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": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Messenger​

POST /v1/messages/messenger/sendmedia
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": "string"
},
"scheduleDateTime": "string",
"mimeType": "string",
"mediaUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

POST /v1/messages/messenger/sendtemplate​

POST /v1/messages/messenger/sendtemplate
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": "string"
},
"location": {
"id": "string"
},
"elements": [
{
"title": "string",
"subtitle": "string",
"image_url": "string",
"default_action": {
"type": "string",
"url": "string"
},
"buttons": [
{
"type": "web_url",
"title": "string",
"payload": "string",
"url": "string"
}
]
}
]
}'
Response 200
{
"success": true
}

POST /v1/messages/messenger/sendtext​

POST /v1/messages/messenger/sendtext
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": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

TikTok​

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

Send TikTok Text Message​

POST /v1/messages/tiktok/sendtext
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": "string"
},
"recepient": {
"tikTokUserId": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send TikTok Media Message​

POST /v1/messages/tiktok/sendmedia
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": "string"
},
"recepient": {
"tikTokUserId": "string"
},
"scheduleDateTime": "string",
"mimeType": "string",
"mediaUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send TikTok Q&A Button Card​

POST /v1/messages/tiktok/sendqabuttoncard
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": "string"
},
"recepient": {
"tikTokUserId": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"buttons": [
"string"
],
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send TikTok Q&A Text Link Card​

POST /v1/messages/tiktok/sendqatextlinkcard
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": "string"
},
"recepient": {
"tikTokUserId": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"buttons": [
"string"
],
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Live Chat (website)​

Send messages to visitors who chat with you through your live chat widget. Use the contact id of the visitor.

Send Live Chat Text Message​

POST /v1/messages/website/sendtext
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": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send Live Chat Media Message​

POST /v1/messages/website/sendmedia
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": "string"
},
"scheduleDateTime": "string",
"mimeType": "string",
"mediaUrl": "string",
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}

Send Live Chat Template Message​

POST /v1/messages/website/sendtemplate
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": "string"
},
"scheduleDateTime": "string",
"textMessage": "string",
"headerType": "TEXT",
"headerTextMessage": "string",
"mimeType": "string",
"mediaUrl": "string",
"buttons": [
{
"type": "web_url",
"title": "string",
"url": "string",
"payload": "string"
}
],
"location": {
"id": "string"
}
}'
Response 200
{
"success": true
}