Send WhatsApp Message
wa_send_messageSend a message from one of your WhatsApp numbers — text, or an attachment: an image via image_base64 (JPEG/PNG, at most 5 MiB; text becomes the caption), a document via document_base64 (any file, at most 20 MiB; text becomes the caption), or audio via audio_base64 (at most 16 MiB; no caption). For a Business (WhatsApp Cloud API) number, set 'template' to send a pre-approved message template (e.g. hello_world) — the only way to start a conversation or to message that number outside the 24-hour window. A 1:1 message to a number that is NOT in this account's contacts is refused with reason recipient_not_contact so you do not message a stranger by accident; set force=true to send anyway (the gate does not apply to groups, channels, templates or Business numbers). In a WhatsApp group, set 'mentions' to a list of phone numbers to @mention those people — they are highlighted and notified, which a plain @name typed in the text is not. Check the returned status: "sent" means delivered; "queued" means the message was accepted but not yet confirmed and may still arrive, so do NOT send it again; "refused" means nothing was sent and the reason explains whether retrying will help.
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": {
"to": "<to>"
},
"name": "wa_send_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | the recipient: a phone number in international form (digits only, e.g. 447700900123) for a 1:1 chat, or a full group/channel JID (…@g.us for a group, …@newsletter for a channel). For a Telegram account send with tg_send_message instead — this tool is WhatsApp only | |
| text | No | the message body; when an image is attached this is its caption and may be empty. Either text or image_base64 is required | |
| force | No | set true to send a 1:1 message to a number that is NOT in this account's contacts; without it such a send is refused with reason recipient_not_contact so you do not message a stranger by accident. No effect on groups, channels, templates or Business (WABA) numbers | |
| mentions | No | optional (WhatsApp groups only): phone numbers in international form (digits only, e.g. 447700900123) to @mention — each is tagged and notified. The number is added to the message as an @<number> token if you have not already written one; writing @<number> in the text yourself works too. Ignored for 1:1 chats and channels, where there is nobody else to tag | |
| template | No | optional: the name of a pre-approved message template to send (Business/WABA numbers only), e.g. hello_world. Use this to start a conversation or to message outside the 24-hour window; text and attachments are ignored when set | |
| audio_ptt | No | optional: true to send as a voice note (push-to-talk) rather than a regular audio attachment | |
| account_id | No | the account to send from — the account_id on the message row you are replying to, or from wa_list_accounts; omit it when the workspace has only one account | |
| audio_mime | No | optional: the audio's mime type, e.g. audio/ogg; codecs=opus | |
| image_mime | No | optional: the image's mime type, image/jpeg or image/png | |
| audio_base64 | No | optional: base64-encoded audio to attach, at most 16 MiB decoded; audio has no caption | |
| image_base64 | No | optional: base64-encoded JPEG or PNG to attach, at most 5 MiB decoded; when set, text becomes the caption | |
| audio_seconds | No | optional: the audio's duration in seconds | |
| document_mime | No | optional: the document's mime type, e.g. application/pdf | |
| document_base64 | No | optional: base64-encoded document/file to attach, at most 20 MiB decoded; when set, text is the caption | |
| document_filename | No | optional: the filename shown to the recipient, e.g. report.pdf | |
| template_language | No | optional: the template's language/locale code, e.g. en_US; defaults to en_US | |
| template_variables | No | optional: values that fill the template body's positional {{1}}, {{2}}, … placeholders, in order |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | sent (delivered), queued (accepted but unconfirmed - do NOT re-send), or refused (not attempted) | |
| refusal | No | present only when status is refused | |
| message_id | No | WhatsApp's id for the message, present only when status is sent | |
| request_id | No | correlation id; a queued message appears in wa_list_messages under this id once it settles |