Send WhatsApp message
aisensy_send_messageWRITE, SENDS A WHATSAPP MESSAGE TO A CUSTOMER AND MAY SPEND AISENSY CREDIT: send either a free-text message (type=text; WhatsApp only delivers it inside the 24-hour window after the customer last wrote) or an approved template (type=template with template_name, language_code and body_params). Not idempotent. Show the user the recipient and the text first and set confirm=true only after they approve. POST /project/{project_id}/messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Message text (type=text). | |
| type | Yes | text = free-form reply; template = an approved template. | |
| confirm | Yes | Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation. | |
| body_params | No | Values for the template's body {{1}}, {{2}}... in order (type=template). | |
| phone_number | Yes | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). | |
| language_code | No | Template language code such as en, en_US, hi (type=template; default en). | |
| template_name | No | Approved template name (type=template). |