Send campaign message
aisensy_send_campaign_messageWRITE, SENDS A WHATSAPP MESSAGE TO A CUSTOMER AND SPENDS AISENSY CREDIT: send the template of a LIVE API campaign to one phone number (a new contact is created if the number is unknown). Not idempotent: every call sends again. template_params must match the template's parameter count. Show the user the recipient and the template first and set confirm=true only after they approve. POST /project/{project_id}/campaign/api/send.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Recipient's name. | |
| tags | No | Existing tags to put on the contact (unknown tags are ignored). | |
| source | No | Lead source label. | |
| confirm | Yes | Must be true. Set it only after the user has seen and approved the recipient and the message in this conversation. | |
| media_url | No | Public https URL of the image/video/document for a media template. | |
| attributes | No | Contact attributes as name → text value. AiSensy ignores attribute names that do not exist in the project. | |
| phone_number | Yes | Phone number with country code, e.g. 919876543210 (digits; a leading + is dropped). | |
| campaign_name | Yes | Name of a LIVE API campaign (see aisensy_list_api_campaigns). | |
| media_filename | No | File name shown for the media. | |
| template_params | No | Values for the template's {{1}}, {{2}}... in order; the count must match the template. | |
| default_country_code | No | Country code to assume when phone_number has none, e.g. 91. |