Integrate Wati, the WhatsApp Business platform, into the workflow. Reply to customers with text, files, buttons, and lists; send approved template messages to one contact or a broadcast list; manage contacts and their attributes; read a conversation; and hand chats to a teammate or team. Can also run workflows when a message arrives or a sent message is delivered, read, replied to, or fails. WhatsApp only allows free-form messages within 24 hours of the contact’s last message; outside that window, or to start a conversation, send an approved template. Requires your Wati API endpoint and an API token.
Send a free-form WhatsApp text message to a contact through Wati. WhatsApp only allows free-form session messages within 24 hours of the contact’s last message to you. Outside that window, or to start a conversation, send an approved template message instead. A success means Wati accepted the message, not that it was delivered.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
messageText | string | Yes | Message text, up to 4096 characters |
replyContextId | string | No | WhatsApp message ID (wamid) to reply to, so the message shows as a quoted reply |
localMessageId | string | No | Your own message ID, echoed back in the Wati status webhooks |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
messageId | string | Wati ID of the queued message. Accepted is not delivered: watch the webhook. |
type | string | Message type, e.g. text, image, or interactive |
text | string | Text that was sent |
created | string | When Wati created the message (ISO 8601) |
Send a WhatsApp-approved template message to one contact through Wati. Templates are required to start a conversation or to message a contact more than 24 hours after their last message; inside that 24-hour window a free-form session message also works. Marketing templates are subject to daily limits. A success means Wati accepted the message, not that it was delivered.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
templateName | string | Yes | Name of a WhatsApp-approved template (its element name), e.g. order_update |
broadcastName | string | No | Label that groups the sends in Wati broadcast reports. Defaults to the template name. |
channelNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
parameters | json | No | Values for the template placeholders, as {"name": "Asha", "order_id": "1234"} or [{"name": "name", "value": "Asha"}]. Use "1", "2", ... as names for numbered placeholders like {{1}}. |
| Parameter | Type | Description |
|---|
phoneNumber | string | Recipient phone number |
templateName | string | Template that was sent |
validWhatsAppNumber | boolean | Whether Wati recognized the number as a WhatsApp user |
localMessageId | string | Message ID echoed in the Wati status webhooks |
info | string | Status note from Wati |
Send one WhatsApp-approved template to up to 1000 contacts in a single Wati call, each with their own placeholder values. Use templates for any contact who has not messaged you in the last 24 hours. A success means Wati queued the sends; check invalidWhatsappNumbers and the status webhooks for failures.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
templateName | string | Yes | Name of a WhatsApp-approved template (its element name), e.g. order_update |
broadcastName | string | No | Label that groups the sends in Wati broadcast reports. Defaults to the template name. |
channelNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
receivers | json | Yes | Up to 1000 recipients: [{"whatsappNumber": "919876543210", "customParams": {"name": "Asha"}, "localMessageId": "optional-your-id"}]. A plain list of numbers also works when the template has no placeholders. |
| Parameter | Type | Description |
|---|
receiverCount | number | Number of receivers submitted |
error | string | Error reported by Wati, if any |
invalidWhatsappNumbers | array | Numbers Wati rejected as invalid |
invalidCustomParameters | array | Placeholder values Wati rejected |
Send an image, video, audio file, or document to a contact on WhatsApp through Wati, from a public URL, with an optional caption. Set voice to send an OGG audio file as a voice note. WhatsApp only allows free-form session messages within 24 hours of the contact’s last message to you. Outside that window, or to start a conversation, send an approved template message instead.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
fileUrl | string | Yes | Public https URL of the image, video, audio file, or document |
caption | string | No | Caption shown with the file |
voice | boolean | No | Send an audio/ogg file as a WhatsApp voice note |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
messageId | string | Wati ID of the queued message. Accepted is not delivered: watch the webhook. |
type | string | Message type, e.g. text, image, or interactive |
text | string | Text that was sent |
created | string | When Wati created the message (ISO 8601) |
Send a WhatsApp interactive message through Wati: up to 3 quick-reply buttons, or a list of up to 10 options behind a menu button. The contact's choice arrives on the Wati webhook. WhatsApp only allows free-form session messages within 24 hours of the contact’s last message to you. Outside that window, or to start a conversation, send an approved template message instead.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
interactiveType | string | Yes | "buttons" for up to 3 reply buttons, or "list" for a menu of up to 10 rows |
body | string | Yes | Main message text, up to 1024 characters |
footer | string | No | Footer text, up to 60 characters |
headerText | string | No | Header text, up to 60 characters |
headerType | string | No | Buttons only: header type, one of Text, Image, Video, or Document |
headerMediaUrl | string | No | Buttons only: media URL for an Image, Video, or Document header |
headerFileName | string | No | Buttons only: file name shown for a Document header |
buttons | json | No | Buttons only: 1 to 3 button labels of up to 20 characters, as ["Yes", "No"] or a comma-separated list |
buttonText | string | No | List only: label of the button that opens the list, e.g. "View options" |
sections | json | No | List only: [{"title": "Plans", "rows": [{"title": "Basic", "description": "Up to 5 users"}]}]. Up to 10 rows in total; titles up to 24 characters, descriptions up to 72. |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
messageId | string | Wati ID of the queued message. Accepted is not delivered: watch the webhook. |
type | string | Message type, e.g. text, image, or interactive |
text | string | Text that was sent |
created | string | When Wati created the message (ISO 8601) |
List the WhatsApp message templates in a Wati workspace with their category, approval status, and body text. Only APPROVED templates can be sent, and a template is what you need to message a contact outside the 24-hour session window.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
pageSize | number | No | Items per page |
pageNumber | number | No | Page number, starting at 1 |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
pageNumber | number | Current page number |
pageSize | number | Page size |
total | number | Total items, when Wati reports it |
nextPage | string | Path of the next page, if any |
prevPage | string | Path of the previous page, if any |
templates | array | Message templates |
↳ id | string | Template ID |
↳ name | string | Template name (element name) to send with |
↳ category | string | MARKETING, UTILITY, or AUTHENTICATION |
↳ status | string | Approval status, e.g. APPROVED |
↳ body | string | Body text with {{placeholders}} |
List contacts in a Wati workspace, optionally filtered by name, creation date, or contact attribute.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
pageSize | number | No | Items per page |
pageNumber | number | No | Page number, starting at 1 |
name | string | No | Only contacts whose name matches |
attribute | json | No | Attribute filter, e.g. [{"name": "city", "operator": "contain", "value": "Pune"}]. Operators include contain, notContain, exist, and notExist. |
createdDate | string | No | Only contacts created on this date (YYYY-MM-DD or MM-DD-YYYY) |
| Parameter | Type | Description |
|---|
pageNumber | number | Current page number |
pageSize | number | Page size |
total | number | Total items, when Wati reports it |
nextPage | string | Path of the next page, if any |
prevPage | string | Path of the previous page, if any |
contacts | array | Contacts |
↳ id | string | Wati contact ID |
↳ waId | string | WhatsApp ID (phone number with country code) |
↳ firstName | string | First name |
↳ fullName | string | Full name |
↳ phone | string | Phone number |
↳ created | string | When the contact was created |
Add a contact to a Wati workspace by WhatsApp number, with a name and custom attributes. Wati also adds contacts automatically on the first message, so this is mainly for saving attributes up front.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | WhatsApp number with country code and no + (e.g. 919876543210) |
name | string | No | Contact name |
customParams | json | No | Custom attributes, as {"city": "Pune", "plan": "Pro"} or [{"name": "city", "value": "Pune"}] |
| Parameter | Type | Description |
|---|
contact | object | The created or existing contact |
↳ id | string | Wati contact ID |
↳ waId | string | WhatsApp ID (phone number with country code) |
↳ firstName | string | First name |
↳ fullName | string | Full name |
↳ phone | string | Phone number |
↳ created | string | When the contact was created |
info | string | Status note from Wati |
Set custom attributes on a Wati contact, such as lead stage, city, or order ID, so they can fill template placeholders and segment broadcasts.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
customParams | json | Yes | Attributes to set, as {"lead_stage": "qualified"} or [{"name": "lead_stage", "value": "qualified"}] |
| Parameter | Type | Description |
|---|
info | string | Status note from Wati |
Get the WhatsApp conversation history with one contact from Wati, newest first, optionally limited to a UTC time range. Use it to give an agent context before replying.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
pageSize | number | No | Items per page |
pageNumber | number | No | Page number, starting at 1 |
from | string | No | Start of the range in UTC, as YYYY-MM-DD HH:mm:ss |
to | string | No | End of the range in UTC, as YYYY-MM-DD HH:mm:ss |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
pageNumber | number | Current page number |
pageSize | number | Page size |
total | number | Total items, when Wati reports it |
nextPage | string | Path of the next page, if any |
prevPage | string | Path of the previous page, if any |
messages | array | Messages in the conversation |
↳ id | string | Message ID |
↳ created | string | When the message was created (ISO 8601) |
↳ type | string | Message type, e.g. text or image |
↳ text | string | Message text |
↳ status | string | Delivery status, e.g. DELIVERED |
↳ owner | boolean | True when your business sent the message |
Assign a WhatsApp chat in the Wati team inbox to a teammate by email, for example to hand a conversation from a bot to a human. Leave the email empty to assign the chat back to the bot.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
email | string | No | Email of the Wati user to assign. Empty assigns the chat to the bot. |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
info | string | Status note from Wati |
Route a WhatsApp chat in the Wati team inbox to one or more teams by name, such as Sales or Support. Available on the Wati Pro and Business plans.
| Parameter | Type | Required | Description |
|---|
apiEndpoint | string | Yes | Your Wati API endpoint from the dashboard API Docs page, e.g. https://live-mt-server.wati.io/123456 (must be https on a wati.io host) |
apiKey | string | Yes | Wati API access token, sent as a Bearer token |
whatsappNumber | string | Yes | Recipient WhatsApp number with country code and no + (e.g. 919876543210), or a Wati contact ID or BSUID |
teams | json | Yes | Team names, as ["Sales", "Support"] or a comma-separated list |
channelPhoneNumber | string | No | Your WhatsApp business number to send from, with country code. Only needed when the workspace has more than one number. |
| Parameter | Type | Description |
|---|
info | string | Status note from Wati |