sendWhatsappMessage
Sends text, template, image, or document WhatsApp messages from a phone number, including template messages outside the 24-hour window; set take_over to stop the agent and reply yourself.
Instructions
Send a text, template, image or document message to a customer.
It goes out from phone_number_id. Set type and the field that matches
it.
Outside the 24-hour window, only a template goes through. Text, image and
document sends are refused with 409 window_closed. A template send works
any time and can start a new conversation.
A send does not take the conversation over, so the agent keeps answering.
Set take_over: true to stop the agent and answer yourself.
Idempotency-Key is required. The same key with the same body replays the first answer instead of sending again.
(Tags: WhatsApp)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"Idempotency-Key": "<Idempotency-Key>",
"phone_number_id": "<phone_number_id>",
"to": "<to>",
"type": "<type>"
},
"name": "sendWhatsappMessage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The customer's number in international format, such as `+15551234567`. | |
| text | No | Required when `type` is `text`. | |
| type | Yes | ||
| media | No | Required when `type` is `image` or `document`. | |
| reply_to | No | A message id in the same conversation to quote. Not allowed with a template. | |
| template | No | Required when `type` is `template`. | |
| take_over | No | Stop the agent answering this conversation and let a person run it. | |
| Idempotency-Key | Yes | A unique string you choose, up to 255 characters. Required on this route. The same key with the same body replays the first answer for 24 hours instead of acting twice. A different body with the same key answers `409`. | |
| phone_number_id | Yes | The number to send from. |