Send a text message
send_textSend a WhatsApp text message.
Set exactly one recipient: number, group_id, or contact_id.
Writing @<number> in the text mentions that person, for example
@5511999999999. The platform detects it automatically; there is no
separate mentions argument.
This is also how to answer the message you just received: a normal
message to its sender, as a person does in a chat, with no quote. Quote
(quoted_message_id, or reply_to_message) only an earlier message that
your answer depends on.
A text message you sent can be corrected later with edit_text_message.
Like a person opening the chat, the number first appears online and its unread messages in that conversation are marked as read, then the message is sent. Opening the conversation this way is automatic and uses no quota of its own.
Returns the new message_id and its initial status. Delivery happens
asynchronously; poll get_message_status or watch list_events for the
outcome.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The message text, 1 to 4096 characters. Write `@<number>` to mention someone. | |
| number | No | Recipient phone number in E.164 form, digits only, country code first (e.g. `5511999999999`). Set exactly one of `number`, `group_id` or `contact_id`. | |
| group_id | No | Recipient group id (`grp_…`), from `list_groups`. A group id belongs to one number: an id from one inbox does not address the same group in another. Set exactly one of `number`, `group_id` or `contact_id`. Addressing a group needs a plan that includes group messaging: without it the call answers `payment_required: feature_not_available`, and retrying will not change that. | |
| contact_id | No | Recipient contact id (`ct_…`), from `list_contacts`. A contact id belongs to one number: an id from one inbox does not address the same person in another. Set exactly one of `number`, `group_id` or `contact_id`. | |
| number_alias | No | Which of the organization's WhatsApp numbers this acts on: `main`, the alias of an extra number, or the number's `id` (`num_…`), which stays the same when the alias is renamed. Call `list_numbers` to see them. Defaults to the main number. | main |
| idempotency_key | No | Any printable ASCII text you choose, 1 to 255 characters, for example the id of the event you are answering. Reusing it for the same number suppresses a duplicate if you retry. Without it, retrying after a timeout may deliver the message twice, and the recipient sees both. | |
| quoted_message_id | No | Quote an earlier message (`msg_…`) so it appears above yours. Do this only when your text depends on something said a while ago, yours or theirs; do not quote the message you are answering right now, send a normal message instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||