Send WhatsApp Message
wa_send_messageSend a WhatsApp message from one of your accounts — 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). 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.
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) | |
| 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 | |
| audio_ptt | No | optional: true to send as a voice note (push-to-talk) rather than a regular audio attachment | |
| account_id | Yes | the account to send from, as returned by wa_list_accounts | |
| 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 |
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 |